<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The AQUA Project, Glasgow University, 1993-1998

-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Core.Opt.Monad</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Configuration of the core-to-core passes</span></span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier">CoreToDo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#runWhen"><span class="hs-identifier">runWhen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#runMaybe"><span class="hs-identifier">runMaybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplMode"><span class="hs-identifier">SimplMode</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FloatOutSwitches"><span class="hs-identifier">FloatOutSwitches</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprPassDetails"><span class="hs-identifier">pprPassDetails</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Plugins</span></span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CorePluginPass"><span class="hs-identifier">CorePluginPass</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#bindsOnlyPass"><span class="hs-identifier">bindsOnlyPass</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Counting</span></span><span>
</span><span id="line-22"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier">SimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#doSimplTick"><span class="hs-identifier">doSimplTick</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#doFreeSimplTick"><span class="hs-identifier">doFreeSimplTick</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#simplCountN"><span class="hs-identifier">simplCountN</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier">pprSimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#plusSimplCount"><span class="hs-identifier">plusSimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#zeroSimplCount"><span class="hs-identifier">zeroSimplCount</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#isZeroSimplCount"><span class="hs-identifier">isZeroSimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#hasDetailedCounts"><span class="hs-identifier">hasDetailedCounts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier">Tick</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><span class="hs-comment">-- * The monad</span></span><span>
</span><span id="line-27"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier">CoreM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#runCoreM"><span class="hs-identifier">runCoreM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Reading from the monad</span></span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getHscEnv"><span class="hs-identifier">getHscEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getRuleBase"><span class="hs-identifier">getRuleBase</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html#getModule"><span class="hs-identifier">getModule</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier">getDynFlags</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getPackageFamInstEnv"><span class="hs-identifier">getPackageFamInstEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getVisibleOrphanMods"><span class="hs-identifier">getVisibleOrphanMods</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getUniqMask"><span class="hs-identifier">getUniqMask</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getPrintUnqualified"><span class="hs-identifier">getPrintUnqualified</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getSrcSpanM"><span class="hs-identifier">getSrcSpanM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Writing to the monad</span></span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#addSimplCount"><span class="hs-identifier">addSimplCount</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Lifting into the monad</span></span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier">liftIO</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#liftIOWithCount"><span class="hs-identifier">liftIOWithCount</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Dealing with annotations</span></span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getAnnotations"><span class="hs-identifier">getAnnotations</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getFirstAnnotations"><span class="hs-identifier">getFirstAnnotations</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Screen output</span></span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#putMsg"><span class="hs-identifier">putMsg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#putMsgS"><span class="hs-identifier">putMsgS</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#errorMsg"><span class="hs-identifier">errorMsg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#errorMsgS"><span class="hs-identifier">errorMsgS</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#warnMsg"><span class="hs-identifier">warnMsg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#fatalErrorMsg"><span class="hs-identifier">fatalErrorMsg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#fatalErrorMsgS"><span class="hs-identifier">fatalErrorMsgS</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#debugTraceMsg"><span class="hs-identifier">debugTraceMsg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#debugTraceMsgS"><span class="hs-identifier">debugTraceMsgS</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>    </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#dumpIfSet_dyn"><span class="hs-identifier">dumpIfSet_dyn</span></a></span><span>
</span><span id="line-49"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Text.Read.html#read"><span class="hs-identifier">read</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#CompilerPhase"><span class="hs-identifier">CompilerPhase</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Annotations.html"><span class="hs-identifier">GHC.Types.Annotations</span></a></span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.IOEnv.html"><span class="hs-identifier">GHC.Data.IOEnv</span></a></span><span> </span><span class="hs-keyword">hiding</span><span>     </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier">liftIO</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.IOEnv.html#failM"><span class="hs-identifier">failM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.IOEnv.html#failWithM"><span class="hs-identifier">failWithM</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Data.IOEnv.html"><span class="hs-identifier">GHC.Data.IOEnv</span></a></span><span>  </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">IOEnv</span></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Outputable</span></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#Severity"><span class="hs-identifier">Severity</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#DumpFormat"><span class="hs-identifier">DumpFormat</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#dumpOptionsFromFlag"><span class="hs-identifier">dumpOptionsFromFlag</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.html"><span class="hs-identifier">GHC.Utils.Monad</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html"><span class="hs-identifier">GHC.Types.Name.Env</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bifunctor.html#"><span class="hs-identifier">Data.Bifunctor</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Bifunctor.html#bimap"><span class="hs-identifier">bimap</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Error.html#dumpAction"><span class="hs-identifier">dumpAction</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.OldList.html#intersperse"><span class="hs-identifier">intersperse</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#groupBy"><span class="hs-identifier">groupBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier">sortBy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#"><span class="hs-identifier">Data.Ord</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Dynamic.html#"><span class="hs-identifier">Data.Dynamic</span></a></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier">Map</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Strict.html#"><span class="hs-identifier">Data.Map.Strict</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">MapStrict</span></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier">Alternative</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.html"><span class="hs-identifier">GHC.Utils.Panic</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Panic.html#throwGhcException"><span class="hs-identifier">throwGhcException</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.html#GhcException"><span class="hs-identifier">GhcException</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
              The CoreToDo type and related types
          Abstraction of core-to-core passes to run.
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-keyword">data</span><span> </span><span id="CoreToDo"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-var">CoreToDo</span></a></span></span><span>           </span><span class="hs-comment">-- These are diff core-to-core passes,</span><span>
</span><span id="line-93"></span><span>                        </span><span class="hs-comment">-- which may be invoked in any order,</span><span>
</span><span id="line-94"></span><span>                        </span><span class="hs-comment">-- as many times as you like.</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="CoreDoSimplify"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoSimplify"><span class="hs-identifier hs-var">CoreDoSimplify</span></a></span></span><span>      </span><span class="hs-comment">-- The core-to-core simplifier.</span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>                    </span><span class="hs-comment">-- Max iterations</span><span>
</span><span id="line-98"></span><span>        </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplMode"><span class="hs-identifier hs-type">SimplMode</span></a></span><span>
</span><span id="line-99"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoPluginPass"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoPluginPass"><span class="hs-identifier hs-var">CoreDoPluginPass</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CorePluginPass"><span class="hs-identifier hs-type">CorePluginPass</span></a></span><span>
</span><span id="line-100"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoFloatInwards"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoFloatInwards"><span class="hs-identifier hs-var">CoreDoFloatInwards</span></a></span></span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoFloatOutwards"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoFloatOutwards"><span class="hs-identifier hs-var">CoreDoFloatOutwards</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FloatOutSwitches"><span class="hs-identifier hs-type">FloatOutSwitches</span></a></span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreLiberateCase"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreLiberateCase"><span class="hs-identifier hs-var">CoreLiberateCase</span></a></span></span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoPrintCore"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoPrintCore"><span class="hs-identifier hs-var">CoreDoPrintCore</span></a></span></span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoStaticArgs"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoStaticArgs"><span class="hs-identifier hs-var">CoreDoStaticArgs</span></a></span></span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoCallArity"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoCallArity"><span class="hs-identifier hs-var">CoreDoCallArity</span></a></span></span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoExitify"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoExitify"><span class="hs-identifier hs-var">CoreDoExitify</span></a></span></span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoDemand"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoDemand"><span class="hs-identifier hs-var">CoreDoDemand</span></a></span></span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoCpr"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoCpr"><span class="hs-identifier hs-var">CoreDoCpr</span></a></span></span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoWorkerWrapper"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoWorkerWrapper"><span class="hs-identifier hs-var">CoreDoWorkerWrapper</span></a></span></span><span>
</span><span id="line-110"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoSpecialising"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoSpecialising"><span class="hs-identifier hs-var">CoreDoSpecialising</span></a></span></span><span>
</span><span id="line-111"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoSpecConstr"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoSpecConstr"><span class="hs-identifier hs-var">CoreDoSpecConstr</span></a></span></span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreCSE"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreCSE"><span class="hs-identifier hs-var">CoreCSE</span></a></span></span><span>
</span><span id="line-113"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoRuleCheck"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoRuleCheck"><span class="hs-identifier hs-var">CoreDoRuleCheck</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#CompilerPhase"><span class="hs-identifier hs-type">CompilerPhase</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>   </span><span class="hs-comment">-- Check for non-application of rules</span><span>
</span><span id="line-114"></span><span>                                           </span><span class="hs-comment">-- matching this string</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoNothing"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoNothing"><span class="hs-identifier hs-var">CoreDoNothing</span></a></span></span><span>                </span><span class="hs-comment">-- Useful when building up</span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDoPasses"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoPasses"><span class="hs-identifier hs-var">CoreDoPasses</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span><span class="hs-special">]</span><span>      </span><span class="hs-comment">-- lists of these things</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDesugar"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDesugar"><span class="hs-identifier hs-var">CoreDesugar</span></a></span></span><span>    </span><span class="hs-comment">-- Right after desugaring, no simple optimisation yet!</span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreDesugarOpt"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDesugarOpt"><span class="hs-identifier hs-var">CoreDesugarOpt</span></a></span></span><span> </span><span class="hs-comment">-- CoreDesugarXXX: Not strictly a core-to-core pass, but produces</span><span>
</span><span id="line-120"></span><span>                       </span><span class="hs-comment">--                 Core output, and hence useful to pass to endPass</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreTidy"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreTidy"><span class="hs-identifier hs-var">CoreTidy</span></a></span></span><span>
</span><span id="line-123"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CorePrep"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CorePrep"><span class="hs-identifier hs-var">CorePrep</span></a></span></span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CoreOccurAnal"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreOccurAnal"><span class="hs-identifier hs-var">CoreOccurAnal</span></a></span></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926783"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-127"></span><span>  </span><span id="local-6989586621680926777"><span class="annot"><span class="annottext">ppr :: CoreToDo -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoSimplify"><span class="hs-identifier hs-type">CoreDoSimplify</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SimplMode
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Simplifier&quot;</span></span><span>
</span><span id="line-128"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoPluginPass"><span class="hs-identifier hs-type">CoreDoPluginPass</span></a></span><span> </span><span id="local-6989586621680926774"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680926774"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="annot"><span class="annottext">CorePluginPass
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Core plugin: &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680926774"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-129"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoFloatInwards"><span class="hs-identifier hs-var">CoreDoFloatInwards</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Float inwards&quot;</span></span><span>
</span><span id="line-130"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoFloatOutwards"><span class="hs-identifier hs-type">CoreDoFloatOutwards</span></a></span><span> </span><span id="local-6989586621680926772"><span class="annot"><span class="annottext">FloatOutSwitches
</span><a href="#local-6989586621680926772"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Float out&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatOutSwitches -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FloatOutSwitches
</span><a href="#local-6989586621680926772"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreLiberateCase"><span class="hs-identifier hs-var">CoreLiberateCase</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Liberate case&quot;</span></span><span>
</span><span id="line-132"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoStaticArgs"><span class="hs-identifier hs-var">CoreDoStaticArgs</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Static argument&quot;</span></span><span>
</span><span id="line-133"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoCallArity"><span class="hs-identifier hs-var">CoreDoCallArity</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Called arity analysis&quot;</span></span><span>
</span><span id="line-134"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoExitify"><span class="hs-identifier hs-var">CoreDoExitify</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Exitification transformation&quot;</span></span><span>
</span><span id="line-135"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoDemand"><span class="hs-identifier hs-var">CoreDoDemand</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Demand analysis&quot;</span></span><span>
</span><span id="line-136"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoCpr"><span class="hs-identifier hs-var">CoreDoCpr</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Constructed Product Result analysis&quot;</span></span><span>
</span><span id="line-137"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoWorkerWrapper"><span class="hs-identifier hs-var">CoreDoWorkerWrapper</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Worker Wrapper binds&quot;</span></span><span>
</span><span id="line-138"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoSpecialising"><span class="hs-identifier hs-var">CoreDoSpecialising</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Specialise&quot;</span></span><span>
</span><span id="line-139"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoSpecConstr"><span class="hs-identifier hs-var">CoreDoSpecConstr</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SpecConstr&quot;</span></span><span>
</span><span id="line-140"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreCSE"><span class="hs-identifier hs-var">CoreCSE</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Common sub-expression&quot;</span></span><span>
</span><span id="line-141"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDesugar"><span class="hs-identifier hs-var">CoreDesugar</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Desugar (before optimization)&quot;</span></span><span>
</span><span id="line-142"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDesugarOpt"><span class="hs-identifier hs-var">CoreDesugarOpt</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Desugar (after optimization)&quot;</span></span><span>
</span><span id="line-143"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreTidy"><span class="hs-identifier hs-var">CoreTidy</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Tidy Core&quot;</span></span><span>
</span><span id="line-144"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CorePrep"><span class="hs-identifier hs-var">CorePrep</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CorePrep&quot;</span></span><span>
</span><span id="line-145"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreOccurAnal"><span class="hs-identifier hs-var">CoreOccurAnal</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Occurrence analysis&quot;</span></span><span>
</span><span id="line-146"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoPrintCore"><span class="hs-identifier hs-var">CoreDoPrintCore</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Print core&quot;</span></span><span>
</span><span id="line-147"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoRuleCheck"><span class="hs-identifier hs-type">CoreDoRuleCheck</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Rule check&quot;</span></span><span>
</span><span id="line-148"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoNothing"><span class="hs-identifier hs-var">CoreDoNothing</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CoreDoNothing&quot;</span></span><span>
</span><span id="line-149"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoPasses"><span class="hs-identifier hs-type">CoreDoPasses</span></a></span><span> </span><span id="local-6989586621680926769"><span class="annot"><span class="annottext">[CoreToDo]
</span><a href="#local-6989586621680926769"><span class="hs-identifier hs-var">passes</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CoreDoPasses&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreToDo] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreToDo]
</span><a href="#local-6989586621680926769"><span class="hs-identifier hs-var">passes</span></a></span><span>
</span><span id="line-150"></span><span>
</span><span id="line-151"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprPassDetails"><span class="hs-identifier hs-type">pprPassDetails</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-152"></span><span id="pprPassDetails"><span class="annot"><span class="annottext">pprPassDetails :: CoreToDo -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprPassDetails"><span class="hs-identifier hs-var hs-var">pprPassDetails</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreDoSimplify"><span class="hs-identifier hs-type">CoreDoSimplify</span></a></span><span> </span><span id="local-6989586621680926768"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926768"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680926767"><span class="annot"><span class="annottext">SimplMode
</span><a href="#local-6989586621680926767"><span class="hs-identifier hs-var">md</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Max iterations =&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926768"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-153"></span><span>                                            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplMode -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SimplMode
</span><a href="#local-6989586621680926767"><span class="hs-identifier hs-var">md</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-154"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprPassDetails"><span class="hs-identifier hs-var">pprPassDetails</span></a></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span class="hs-keyword">data</span><span> </span><span id="SimplMode"><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplMode"><span class="hs-identifier hs-var">SimplMode</span></a></span></span><span>             </span><span class="hs-comment">-- See comments in GHC.Core.Opt.Simplify.Monad</span><span>
</span><span id="line-157"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="SimplMode"><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplMode"><span class="hs-identifier hs-var">SimplMode</span></a></span></span><span>
</span><span id="line-158"></span><span>        </span><span class="hs-special">{</span><span> </span><span id="sm_names"><span class="annot"><span class="annottext">SimplMode -&gt; [String]
</span><a href="GHC.Core.Opt.Monad.html#sm_names"><span class="hs-identifier hs-var hs-var">sm_names</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- Name(s) of the phase</span><span>
</span><span id="line-159"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="sm_phase"><span class="annot"><span class="annottext">SimplMode -&gt; CompilerPhase
</span><a href="GHC.Core.Opt.Monad.html#sm_phase"><span class="hs-identifier hs-var hs-var">sm_phase</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#CompilerPhase"><span class="hs-identifier hs-type">CompilerPhase</span></a></span><span>
</span><span id="line-160"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="sm_dflags"><span class="annot"><span class="annottext">SimplMode -&gt; DynFlags
</span><a href="GHC.Core.Opt.Monad.html#sm_dflags"><span class="hs-identifier hs-var hs-var">sm_dflags</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-comment">-- Just for convenient non-monadic</span><span>
</span><span id="line-161"></span><span>                                    </span><span class="hs-comment">-- access; we don't override these</span><span>
</span><span id="line-162"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="sm_rules"><span class="annot"><span class="annottext">SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_rules"><span class="hs-identifier hs-var hs-var">sm_rules</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>     </span><span class="hs-comment">-- Whether RULES are enabled</span><span>
</span><span id="line-163"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="sm_inline"><span class="annot"><span class="annottext">SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_inline"><span class="hs-identifier hs-var hs-var">sm_inline</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>     </span><span class="hs-comment">-- Whether inlining is enabled</span><span>
</span><span id="line-164"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="sm_case_case"><span class="annot"><span class="annottext">SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_case_case"><span class="hs-identifier hs-var hs-var">sm_case_case</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>     </span><span class="hs-comment">-- Whether case-of-case is enabled</span><span>
</span><span id="line-165"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="sm_eta_expand"><span class="annot"><span class="annottext">SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_eta_expand"><span class="hs-identifier hs-var hs-var">sm_eta_expand</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>     </span><span class="hs-comment">-- Whether eta-expansion is enabled</span><span>
</span><span id="line-166"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926753"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplMode"><span class="hs-identifier hs-type">SimplMode</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-169"></span><span>    </span><span id="local-6989586621680926749"><span class="annot"><span class="annottext">ppr :: SimplMode -&gt; SDoc
</span><a href="#local-6989586621680926749"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplMode"><span class="hs-identifier hs-type">SimplMode</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">sm_phase :: SimplMode -&gt; CompilerPhase
</span><a href="GHC.Core.Opt.Monad.html#sm_phase"><span class="hs-identifier hs-var">sm_phase</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926748"><span class="annot"><span class="annottext">CompilerPhase
</span><a href="#local-6989586621680926748"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sm_names :: SimplMode -&gt; [String]
</span><a href="GHC.Core.Opt.Monad.html#sm_names"><span class="hs-identifier hs-var">sm_names</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926747"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680926747"><span class="hs-identifier hs-var">ss</span></a></span></span><span>
</span><span id="line-170"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sm_rules :: SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_rules"><span class="hs-identifier hs-var">sm_rules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926746"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926746"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sm_inline :: SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_inline"><span class="hs-identifier hs-var">sm_inline</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926745"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926745"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-171"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sm_eta_expand :: SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_eta_expand"><span class="hs-identifier hs-var">sm_eta_expand</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926744"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926744"><span class="hs-identifier hs-var">eta</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">sm_case_case :: SimplMode -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#sm_case_case"><span class="hs-identifier hs-var">sm_case_case</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926743"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926743"><span class="hs-identifier hs-var">cc</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SimplMode&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-173"></span><span>         </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Phase =&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerPhase -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerPhase
</span><a href="#local-6989586621680926748"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-174"></span><span>               </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#brackets"><span class="hs-identifier hs-var">brackets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; String
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; String) -&gt; [String] -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intersperse"><span class="hs-identifier hs-var">intersperse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;,&quot;</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621680926747"><span class="hs-identifier hs-var">ss</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span>
</span><span id="line-175"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; PtrString -&gt; SDoc
</span><a href="#local-6989586621680926737"><span class="hs-identifier hs-var">pp_flag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926745"><span class="hs-identifier hs-var">i</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;inline&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span>
</span><span id="line-176"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; PtrString -&gt; SDoc
</span><a href="#local-6989586621680926737"><span class="hs-identifier hs-var">pp_flag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926746"><span class="hs-identifier hs-var">r</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rules&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span>
</span><span id="line-177"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; PtrString -&gt; SDoc
</span><a href="#local-6989586621680926737"><span class="hs-identifier hs-var">pp_flag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926744"><span class="hs-identifier hs-var">eta</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;eta-expand&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span>
</span><span id="line-178"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; PtrString -&gt; SDoc
</span><a href="#local-6989586621680926737"><span class="hs-identifier hs-var">pp_flag</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926743"><span class="hs-identifier hs-var">cc</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;case-of-case&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>         </span><span class="hs-keyword">where</span><span>
</span><span id="line-180"></span><span>           </span><span id="local-6989586621680926737"><span class="annot"><span class="annottext">pp_flag :: Bool -&gt; PtrString -&gt; SDoc
</span><a href="#local-6989586621680926737"><span class="hs-identifier hs-var hs-var">pp_flag</span></a></span></span><span> </span><span id="local-6989586621680926735"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926735"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680926734"><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680926734"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppUnless"><span class="hs-identifier hs-var">ppUnless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926735"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;no&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680926734"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span class="hs-keyword">data</span><span> </span><span id="FloatOutSwitches"><span class="annot"><a href="GHC.Core.Opt.Monad.html#FloatOutSwitches"><span class="hs-identifier hs-var">FloatOutSwitches</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="FloatOutSwitches"><span class="annot"><a href="GHC.Core.Opt.Monad.html#FloatOutSwitches"><span class="hs-identifier hs-var">FloatOutSwitches</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-183"></span><span>  </span><span id="floatOutLambdas"><span class="annot"><span class="annottext">FloatOutSwitches -&gt; Maybe Int
</span><a href="GHC.Core.Opt.Monad.html#floatOutLambdas"><span class="hs-identifier hs-var hs-var">floatOutLambdas</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- ^ Just n &lt;=&gt; float lambdas to top level, if</span><span>
</span><span id="line-184"></span><span>                                   </span><span class="hs-comment">-- doing so will abstract over n or fewer</span><span>
</span><span id="line-185"></span><span>                                   </span><span class="hs-comment">-- value variables</span><span>
</span><span id="line-186"></span><span>                                   </span><span class="hs-comment">-- Nothing &lt;=&gt; float all lambdas to top level,</span><span>
</span><span id="line-187"></span><span>                                   </span><span class="hs-comment">--             regardless of how many free variables</span><span>
</span><span id="line-188"></span><span>                                   </span><span class="hs-comment">-- Just 0 is the vanilla case: float a lambda</span><span>
</span><span id="line-189"></span><span>                                   </span><span class="hs-comment">--    iff it has no free vars</span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span>  </span><span id="floatOutConstants"><span class="annot"><span class="annottext">FloatOutSwitches -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#floatOutConstants"><span class="hs-identifier hs-var hs-var">floatOutConstants</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>       </span><span class="hs-comment">-- ^ True &lt;=&gt; float constants to top level,</span><span>
</span><span id="line-192"></span><span>                                   </span><span class="hs-comment">--            even if they do not escape a lambda</span><span>
</span><span id="line-193"></span><span>  </span><span id="floatOutOverSatApps"><span class="annot"><span class="annottext">FloatOutSwitches -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#floatOutOverSatApps"><span class="hs-identifier hs-var hs-var">floatOutOverSatApps</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>
</span><span id="line-194"></span><span>                             </span><span class="hs-comment">-- ^ True &lt;=&gt; float out over-saturated applications</span><span>
</span><span id="line-195"></span><span>                             </span><span class="hs-comment">--            based on arity information.</span><span>
</span><span id="line-196"></span><span>                             </span><span class="hs-comment">-- See Note [Floating over-saturated applications]</span><span>
</span><span id="line-197"></span><span>                             </span><span class="hs-comment">-- in GHC.Core.Opt.SetLevels</span><span>
</span><span id="line-198"></span><span>  </span><span id="floatToTopLevelOnly"><span class="annot"><span class="annottext">FloatOutSwitches -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#floatToTopLevelOnly"><span class="hs-identifier hs-var hs-var">floatToTopLevelOnly</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>      </span><span class="hs-comment">-- ^ Allow floating to the top level only.</span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-200"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926724"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FloatOutSwitches"><span class="hs-identifier hs-type">FloatOutSwitches</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-201"></span><span>    </span><span id="local-6989586621680926723"><span class="annot"><span class="annottext">ppr :: FloatOutSwitches -&gt; SDoc
</span><a href="#local-6989586621680926723"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatOutSwitches -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprFloatOutSwitches"><span class="hs-identifier hs-var">pprFloatOutSwitches</span></a></span><span>
</span><span id="line-202"></span><span>
</span><span id="line-203"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprFloatOutSwitches"><span class="hs-identifier hs-type">pprFloatOutSwitches</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FloatOutSwitches"><span class="hs-identifier hs-type">FloatOutSwitches</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-204"></span><span id="pprFloatOutSwitches"><span class="annot"><span class="annottext">pprFloatOutSwitches :: FloatOutSwitches -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprFloatOutSwitches"><span class="hs-identifier hs-var hs-var">pprFloatOutSwitches</span></a></span></span><span> </span><span id="local-6989586621680926721"><span class="annot"><span class="annottext">FloatOutSwitches
</span><a href="#local-6989586621680926721"><span class="hs-identifier hs-var">sw</span></a></span></span><span>
</span><span id="line-205"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;FOS&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-206"></span><span>     </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-207"></span><span>     </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Lam =&quot;</span></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatOutSwitches -&gt; Maybe Int
</span><a href="GHC.Core.Opt.Monad.html#floatOutLambdas"><span class="hs-identifier hs-var hs-var">floatOutLambdas</span></a></span><span> </span><span class="annot"><span class="annottext">FloatOutSwitches
</span><a href="#local-6989586621680926721"><span class="hs-identifier hs-var">sw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Consts =&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatOutSwitches -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#floatOutConstants"><span class="hs-identifier hs-var hs-var">floatOutConstants</span></a></span><span> </span><span class="annot"><span class="annottext">FloatOutSwitches
</span><a href="#local-6989586621680926721"><span class="hs-identifier hs-var">sw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;OverSatApps =&quot;</span></span><span>   </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatOutSwitches -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#floatOutOverSatApps"><span class="hs-identifier hs-var hs-var">floatOutOverSatApps</span></a></span><span> </span><span class="annot"><span class="annottext">FloatOutSwitches
</span><a href="#local-6989586621680926721"><span class="hs-identifier hs-var">sw</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="hs-comment">-- The core-to-core pass ordering is derived from the DynFlags:</span><span>
</span><span id="line-212"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#runWhen"><span class="hs-identifier hs-type">runWhen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span><span>
</span><span id="line-213"></span><span id="runWhen"><span class="annot"><span class="annottext">runWhen :: Bool -&gt; CoreToDo -&gt; CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#runWhen"><span class="hs-identifier hs-var hs-var">runWhen</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span id="local-6989586621680926719"><span class="annot"><span class="annottext">CoreToDo
</span><a href="#local-6989586621680926719"><span class="hs-identifier hs-var">do_this</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="#local-6989586621680926719"><span class="hs-identifier hs-var">do_this</span></a></span><span>
</span><span id="line-214"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#runWhen"><span class="hs-identifier hs-var">runWhen</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoNothing"><span class="hs-identifier hs-var">CoreDoNothing</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span id="local-6989586621680927135"><span class="annot"><a href="GHC.Core.Opt.Monad.html#runMaybe"><span class="hs-identifier hs-type">runMaybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927135"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680927135"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreToDo"><span class="hs-identifier hs-type">CoreToDo</span></a></span></span><span>
</span><span id="line-217"></span><span id="runMaybe"><span class="annot"><span class="annottext">runMaybe :: forall a. Maybe a -&gt; (a -&gt; CoreToDo) -&gt; CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#runMaybe"><span class="hs-identifier hs-var hs-var">runMaybe</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680926718"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926718"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680926717"><span class="annot"><span class="annottext">a -&gt; CoreToDo
</span><a href="#local-6989586621680926717"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; CoreToDo
</span><a href="#local-6989586621680926717"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926718"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#runMaybe"><span class="hs-identifier hs-var">runMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="annot"><span class="annottext">a -&gt; CoreToDo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreToDo
</span><a href="GHC.Core.Opt.Monad.html#CoreDoNothing"><span class="hs-identifier hs-var">CoreDoNothing</span></a></span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span class="hs-comment">{-

************************************************************************
*                                                                      *
             Types for Plugins
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-228"></span><span>
</span><span id="line-229"></span><span class="hs-comment">-- | A description of the plugin pass itself</span><span>
</span><span id="line-230"></span><span class="hs-keyword">type</span><span> </span><span id="CorePluginPass"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CorePluginPass"><span class="hs-identifier hs-var">CorePluginPass</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#bindsOnlyPass"><span class="hs-identifier hs-type">bindsOnlyPass</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#CoreProgram"><span class="hs-identifier hs-type">CoreProgram</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreProgram"><span class="hs-identifier hs-type">CoreProgram</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span>
</span><span id="line-233"></span><span id="bindsOnlyPass"><span class="annot"><span class="annottext">bindsOnlyPass :: (CoreProgram -&gt; CoreM CoreProgram) -&gt; CorePluginPass
</span><a href="GHC.Core.Opt.Monad.html#bindsOnlyPass"><span class="hs-identifier hs-var hs-var">bindsOnlyPass</span></a></span></span><span> </span><span id="local-6989586621680926716"><span class="annot"><span class="annottext">CoreProgram -&gt; CoreM CoreProgram
</span><a href="#local-6989586621680926716"><span class="hs-identifier hs-var">pass</span></a></span></span><span> </span><span id="local-6989586621680926715"><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680926715"><span class="hs-identifier hs-var">guts</span></a></span></span><span>
</span><span id="line-234"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680926714"><span class="annot"><span class="annottext">CoreProgram
</span><a href="#local-6989586621680926714"><span class="hs-identifier hs-var">binds'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreProgram -&gt; CoreM CoreProgram
</span><a href="#local-6989586621680926716"><span class="hs-identifier hs-var">pass</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModGuts -&gt; CoreProgram
</span><a href="GHC.Driver.Types.html#mg_binds"><span class="hs-identifier hs-var hs-var">mg_binds</span></a></span><span> </span><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680926715"><span class="hs-identifier hs-var">guts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CorePluginPass
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680926715"><span class="hs-identifier hs-var">guts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mg_binds :: CoreProgram
</span><a href="GHC.Driver.Types.html#mg_binds"><span class="hs-identifier hs-var">mg_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreProgram
</span><a href="#local-6989586621680926714"><span class="hs-identifier hs-var">binds'</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-236"></span><span>
</span><span id="line-237"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
             Counting and logging
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getVerboseSimplStats"><span class="hs-identifier hs-type">getVerboseSimplStats</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-246"></span><span id="getVerboseSimplStats"><span class="annot"><span class="annottext">getVerboseSimplStats :: (Bool -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#getVerboseSimplStats"><span class="hs-identifier hs-var hs-var">getVerboseSimplStats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#getPprDebug"><span class="hs-identifier hs-var">getPprDebug</span></a></span><span>          </span><span class="hs-comment">-- For now, anyway</span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#zeroSimplCount"><span class="hs-identifier hs-type">zeroSimplCount</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-249"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#isZeroSimplCount"><span class="hs-identifier hs-type">isZeroSimplCount</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-250"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#hasDetailedCounts"><span class="hs-identifier hs-type">hasDetailedCounts</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-251"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier hs-type">pprSimplCount</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-252"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#doSimplTick"><span class="hs-identifier hs-type">doSimplTick</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-253"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#doFreeSimplTick"><span class="hs-identifier hs-type">doFreeSimplTick</span></a></span><span>    </span><span class="hs-glyph">::</span><span>             </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-254"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#plusSimplCount"><span class="hs-identifier hs-type">plusSimplCount</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-keyword">data</span><span> </span><span id="SimplCount"><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-var">SimplCount</span></a></span></span><span>
</span><span id="line-257"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="VerySimplCount"><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-var">VerySimplCount</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>        </span><span class="hs-comment">-- Used when don't want detailed stats</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="SimplCount"><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-var">SimplCount</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-260"></span><span>        </span><span id="ticks"><span class="annot"><span class="annottext">SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var hs-var">ticks</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- Total ticks</span><span>
</span><span id="line-261"></span><span>        </span><span id="details"><span class="annot"><span class="annottext">SimplCount -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var hs-var">details</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#TickCounts"><span class="hs-identifier hs-type">TickCounts</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- How many of each type</span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span>        </span><span id="n_log"><span class="annot"><span class="annottext">SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#n_log"><span class="hs-identifier hs-var hs-var">n_log</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- N</span><span>
</span><span id="line-264"></span><span>        </span><span id="log1"><span class="annot"><span class="annottext">SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var hs-var">log1</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>      </span><span class="hs-comment">-- Last N events; &lt;= opt_HistorySize,</span><span>
</span><span id="line-265"></span><span>                                </span><span class="hs-comment">--   most recent first</span><span>
</span><span id="line-266"></span><span>        </span><span id="log2"><span class="annot"><span class="annottext">SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log2"><span class="hs-identifier hs-var hs-var">log2</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span class="hs-special">]</span><span>       </span><span class="hs-comment">-- Last opt_HistorySize events before that</span><span>
</span><span id="line-267"></span><span>                                </span><span class="hs-comment">-- Having log1, log2 lets us accumulate the</span><span>
</span><span id="line-268"></span><span>                                </span><span class="hs-comment">-- recent history reasonably efficiently</span><span>
</span><span id="line-269"></span><span>     </span><span class="hs-special">}</span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="hs-keyword">type</span><span> </span><span id="TickCounts"><span class="annot"><a href="GHC.Core.Opt.Monad.html#TickCounts"><span class="hs-identifier hs-var">TickCounts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#simplCountN"><span class="hs-identifier hs-type">simplCountN</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-274"></span><span id="simplCountN"><span class="annot"><span class="annottext">simplCountN :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#simplCountN"><span class="hs-identifier hs-var hs-var">simplCountN</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-type">VerySimplCount</span></a></span><span> </span><span id="local-6989586621680926703"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926703"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926703"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-275"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#simplCountN"><span class="hs-identifier hs-var">simplCountN</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926702"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926702"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926702"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span id="zeroSimplCount"><span class="annot"><span class="annottext">zeroSimplCount :: DynFlags -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#zeroSimplCount"><span class="hs-identifier hs-var hs-var">zeroSimplCount</span></a></span></span><span> </span><span id="local-6989586621680926701"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926701"><span class="hs-identifier hs-var">dflags</span></a></span></span><span>
</span><span id="line-278"></span><span>                </span><span class="hs-comment">-- This is where we decide whether to do</span><span>
</span><span id="line-279"></span><span>                </span><span class="hs-comment">-- the VerySimpl version or the full-stats version</span><span>
</span><span id="line-280"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DumpFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#dopt"><span class="hs-identifier hs-var">dopt</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_simpl_stats"><span class="hs-identifier hs-var">Opt_D_dump_simpl_stats</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926701"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-281"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount :: Int -&gt; TickCounts -&gt; Int -&gt; [Tick] -&gt; [Tick] -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">ticks :: Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">details :: TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TickCounts
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-282"></span><span>                </span><span class="annot"><span class="annottext">n_log :: Int
</span><a href="GHC.Core.Opt.Monad.html#n_log"><span class="hs-identifier hs-var">n_log</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log1 :: [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var">log1</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log2 :: [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log2"><span class="hs-identifier hs-var">log2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">}</span><span>
</span><span id="line-283"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-284"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-var">VerySimplCount</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-285"></span><span>
</span><span id="line-286"></span><span id="isZeroSimplCount"><span class="annot"><span class="annottext">isZeroSimplCount :: SimplCount -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#isZeroSimplCount"><span class="hs-identifier hs-var hs-var">isZeroSimplCount</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-type">VerySimplCount</span></a></span><span> </span><span id="local-6989586621680926697"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926697"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926697"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-287"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#isZeroSimplCount"><span class="hs-identifier hs-var">isZeroSimplCount</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926696"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926696"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926696"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span id="hasDetailedCounts"><span class="annot"><span class="annottext">hasDetailedCounts :: SimplCount -&gt; Bool
</span><a href="GHC.Core.Opt.Monad.html#hasDetailedCounts"><span class="hs-identifier hs-var hs-var">hasDetailedCounts</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-type">VerySimplCount</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-290"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#hasDetailedCounts"><span class="hs-identifier hs-var">hasDetailedCounts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span id="doFreeSimplTick"><span class="annot"><span class="annottext">doFreeSimplTick :: Tick -&gt; SimplCount -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#doFreeSimplTick"><span class="hs-identifier hs-var hs-var">doFreeSimplTick</span></a></span></span><span> </span><span id="local-6989586621680926695"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926695"><span class="hs-identifier hs-var">tick</span></a></span></span><span> </span><span id="local-6989586621680926694"><span class="annot"><span class="annottext">sc :: SimplCount
</span><a href="#local-6989586621680926694"><span class="hs-identifier hs-var">sc</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">details :: SimplCount -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926693"><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926693"><span class="hs-identifier hs-var">dts</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-293"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926694"><span class="hs-identifier hs-var">sc</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">details :: TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926693"><span class="hs-identifier hs-var">dts</span></a></span><span> </span><span class="annot"><span class="annottext">TickCounts -&gt; Tick -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#addTick"><span class="hs-operator hs-var">`addTick`</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926695"><span class="hs-identifier hs-var">tick</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-294"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#doFreeSimplTick"><span class="hs-identifier hs-var">doFreeSimplTick</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680926691"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926691"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926691"><span class="hs-identifier hs-var">sc</span></a></span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span id="doSimplTick"><span class="annot"><span class="annottext">doSimplTick :: DynFlags -&gt; Tick -&gt; SimplCount -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#doSimplTick"><span class="hs-identifier hs-var hs-var">doSimplTick</span></a></span></span><span> </span><span id="local-6989586621680926690"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926690"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680926689"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926689"><span class="hs-identifier hs-var">tick</span></a></span></span><span>
</span><span id="line-297"></span><span>    </span><span id="local-6989586621680926688"><span class="annot"><span class="annottext">sc :: SimplCount
</span><a href="#local-6989586621680926688"><span class="hs-identifier hs-var">sc</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926687"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926687"><span class="hs-identifier hs-var">tks</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">details :: SimplCount -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926686"><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926686"><span class="hs-identifier hs-var">dts</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_log :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#n_log"><span class="hs-identifier hs-var">n_log</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926685"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926685"><span class="hs-identifier hs-var">nl</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log1 :: SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var">log1</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926684"><span class="annot"><span class="annottext">[Tick]
</span><a href="#local-6989586621680926684"><span class="hs-identifier hs-var">l1</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-298"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926685"><span class="hs-identifier hs-var">nl</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#historySize"><span class="hs-identifier hs-var hs-var">historySize</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926690"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926682"><span class="hs-identifier hs-var">sc1</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_log :: Int
</span><a href="GHC.Core.Opt.Monad.html#n_log"><span class="hs-identifier hs-var">n_log</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log1 :: [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var">log1</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926689"><span class="hs-identifier hs-var">tick</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log2 :: [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log2"><span class="hs-identifier hs-var">log2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Tick]
</span><a href="#local-6989586621680926684"><span class="hs-identifier hs-var">l1</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-299"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926682"><span class="hs-identifier hs-var">sc1</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_log :: Int
</span><a href="GHC.Core.Opt.Monad.html#n_log"><span class="hs-identifier hs-var">n_log</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926685"><span class="hs-identifier hs-var">nl</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log1 :: [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var">log1</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926689"><span class="hs-identifier hs-var">tick</span></a></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; [Tick] -&gt; [Tick]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Tick]
</span><a href="#local-6989586621680926684"><span class="hs-identifier hs-var">l1</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-300"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-301"></span><span>    </span><span id="local-6989586621680926682"><span class="annot"><span class="annottext">sc1 :: SimplCount
</span><a href="#local-6989586621680926682"><span class="hs-identifier hs-var hs-var">sc1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926688"><span class="hs-identifier hs-var">sc</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926687"><span class="hs-identifier hs-var">tks</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">details :: TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926686"><span class="hs-identifier hs-var">dts</span></a></span><span> </span><span class="annot"><span class="annottext">TickCounts -&gt; Tick -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#addTick"><span class="hs-operator hs-var">`addTick`</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926689"><span class="hs-identifier hs-var">tick</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#doSimplTick"><span class="hs-identifier hs-var">doSimplTick</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Tick
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-type">VerySimplCount</span></a></span><span> </span><span id="local-6989586621680926678"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926678"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-var">VerySimplCount</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926678"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span>
</span><span id="line-306"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#addTick"><span class="hs-identifier hs-type">addTick</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#TickCounts"><span class="hs-identifier hs-type">TickCounts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#TickCounts"><span class="hs-identifier hs-type">TickCounts</span></a></span><span>
</span><span id="line-307"></span><span id="addTick"><span class="annot"><span class="annottext">addTick :: TickCounts -&gt; Tick -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#addTick"><span class="hs-identifier hs-var hs-var">addTick</span></a></span></span><span> </span><span id="local-6989586621680926677"><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926677"><span class="hs-identifier hs-var">fm</span></a></span></span><span> </span><span id="local-6989586621680926676"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926676"><span class="hs-identifier hs-var">tick</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int -&gt; Int) -&gt; Tick -&gt; Int -&gt; TickCounts -&gt; TickCounts
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; k -&gt; a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Strict.Internal.html#insertWith"><span class="hs-identifier hs-var">MapStrict.insertWith</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">(+)</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926676"><span class="hs-identifier hs-var">tick</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926677"><span class="hs-identifier hs-var">fm</span></a></span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span id="plusSimplCount"><span class="annot"><span class="annottext">plusSimplCount :: SimplCount -&gt; SimplCount -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#plusSimplCount"><span class="hs-identifier hs-var hs-var">plusSimplCount</span></a></span></span><span> </span><span id="local-6989586621680926674"><span class="annot"><span class="annottext">sc1 :: SimplCount
</span><a href="#local-6989586621680926674"><span class="hs-identifier hs-var">sc1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926673"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926673"><span class="hs-identifier hs-var">tks1</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">details :: SimplCount -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926672"><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926672"><span class="hs-identifier hs-var">dts1</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-310"></span><span>               </span><span id="local-6989586621680926671"><span class="annot"><span class="annottext">sc2 :: SimplCount
</span><a href="#local-6989586621680926671"><span class="hs-identifier hs-var">sc2</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926670"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926670"><span class="hs-identifier hs-var">tks2</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">details :: SimplCount -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926669"><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926669"><span class="hs-identifier hs-var">dts2</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-311"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926668"><span class="hs-identifier hs-var">log_base</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926673"><span class="hs-identifier hs-var">tks1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926670"><span class="hs-identifier hs-var">tks2</span></a></span><span>
</span><span id="line-312"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">details :: TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Int -&gt; Int) -&gt; TickCounts -&gt; TickCounts -&gt; TickCounts
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; Map k a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Strict.Internal.html#unionWith"><span class="hs-identifier hs-var">MapStrict.unionWith</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">(+)</span></a></span><span> </span><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926672"><span class="hs-identifier hs-var">dts1</span></a></span><span> </span><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926669"><span class="hs-identifier hs-var">dts2</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-313"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-314"></span><span>        </span><span class="hs-comment">-- A hackish way of getting recent log info</span><span>
</span><span id="line-315"></span><span>    </span><span id="local-6989586621680926668"><span class="annot"><span class="annottext">log_base :: SimplCount
</span><a href="#local-6989586621680926668"><span class="hs-identifier hs-var hs-var">log_base</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Tick] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var hs-var">log1</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926671"><span class="hs-identifier hs-var">sc2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926674"><span class="hs-identifier hs-var">sc1</span></a></span><span>    </span><span class="hs-comment">-- Nothing at all in sc2</span><span>
</span><span id="line-316"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Tick] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log2"><span class="hs-identifier hs-var hs-var">log2</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926671"><span class="hs-identifier hs-var">sc2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926671"><span class="hs-identifier hs-var">sc2</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">log2 :: [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log2"><span class="hs-identifier hs-var">log2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var hs-var">log1</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926674"><span class="hs-identifier hs-var">sc1</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-317"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926671"><span class="hs-identifier hs-var">sc2</span></a></span><span>
</span><span id="line-318"></span><span>
</span><span id="line-319"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#plusSimplCount"><span class="hs-identifier hs-var">plusSimplCount</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-type">VerySimplCount</span></a></span><span> </span><span id="local-6989586621680926663"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926663"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-type">VerySimplCount</span></a></span><span> </span><span id="local-6989586621680926662"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926662"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-var">VerySimplCount</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926663"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926662"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-320"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#plusSimplCount"><span class="hs-identifier hs-var">plusSimplCount</span></a></span><span> </span><span id="local-6989586621680926661"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926661"><span class="hs-identifier hs-var">lhs</span></a></span></span><span>                </span><span id="local-6989586621680926660"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926660"><span class="hs-identifier hs-var">rhs</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span>
</span><span id="line-321"></span><span>  </span><span class="annot"><span class="annottext">GhcException -&gt; SimplCount
forall a. GhcException -&gt; a
</span><a href="GHC.Utils.Panic.html#throwGhcException"><span class="hs-identifier hs-var">throwGhcException</span></a></span><span> </span><span class="annot"><span class="annottext">(GhcException -&gt; SimplCount)
-&gt; (SDoc -&gt; GhcException) -&gt; SDoc -&gt; SimplCount
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; GhcException
</span><a href="GHC.Utils.Panic.html#PprProgramError"><span class="hs-identifier hs-var">PprProgramError</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;plusSimplCount&quot;</span></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SimplCount) -&gt; SDoc -&gt; SimplCount
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>
</span><span id="line-322"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs&quot;</span></span><span>
</span><span id="line-323"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier hs-var">pprSimplCount</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926661"><span class="hs-identifier hs-var">lhs</span></a></span><span>
</span><span id="line-324"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rhs&quot;</span></span><span>
</span><span id="line-325"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier hs-var">pprSimplCount</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926660"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-326"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-327"></span><span>       </span><span class="hs-comment">-- We use one or the other consistently</span><span>
</span><span id="line-328"></span><span>
</span><span id="line-329"></span><span id="pprSimplCount"><span class="annot"><span class="annottext">pprSimplCount :: SimplCount -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier hs-var hs-var">pprSimplCount</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#VerySimplCount"><span class="hs-identifier hs-type">VerySimplCount</span></a></span><span> </span><span id="local-6989586621680926657"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926657"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Total ticks:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926657"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-330"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprSimplCount"><span class="hs-identifier hs-var">pprSimplCount</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ticks :: SimplCount -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#ticks"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926656"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926656"><span class="hs-identifier hs-var">tks</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">details :: SimplCount -&gt; TickCounts
</span><a href="GHC.Core.Opt.Monad.html#details"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926655"><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926655"><span class="hs-identifier hs-var">dts</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log1 :: SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log1"><span class="hs-identifier hs-var">log1</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926654"><span class="annot"><span class="annottext">[Tick]
</span><a href="#local-6989586621680926654"><span class="hs-identifier hs-var">l1</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">log2 :: SimplCount -&gt; [Tick]
</span><a href="GHC.Core.Opt.Monad.html#log2"><span class="hs-identifier hs-var">log2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680926653"><span class="annot"><span class="annottext">[Tick]
</span><a href="#local-6989586621680926653"><span class="hs-identifier hs-var">l2</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-331"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Total ticks:    &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926656"><span class="hs-identifier hs-var">tks</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-332"></span><span>          </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#blankLine"><span class="hs-identifier hs-var">blankLine</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-333"></span><span>          </span><span class="annot"><span class="annottext">TickCounts -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprTickCounts"><span class="hs-identifier hs-var">pprTickCounts</span></a></span><span> </span><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926655"><span class="hs-identifier hs-var">dts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-334"></span><span>          </span><span class="annot"><span class="annottext">(Bool -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#getVerboseSimplStats"><span class="hs-identifier hs-var">getVerboseSimplStats</span></a></span><span> </span><span class="annot"><span class="annottext">((Bool -&gt; SDoc) -&gt; SDoc) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680926650"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926650"><span class="hs-identifier hs-var">dbg</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680926650"><span class="hs-identifier hs-var">dbg</span></a></span><span>
</span><span id="line-335"></span><span>          </span><span class="hs-keyword">then</span><span>
</span><span id="line-336"></span><span>                </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#blankLine"><span class="hs-identifier hs-var">blankLine</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-337"></span><span>                      </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Log (most recent first)&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-338"></span><span>                      </span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Tick -&gt; SDoc) -&gt; [Tick] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Tick]
</span><a href="#local-6989586621680926654"><span class="hs-identifier hs-var">l1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Tick -&gt; SDoc) -&gt; [Tick] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Tick]
</span><a href="#local-6989586621680926653"><span class="hs-identifier hs-var">l2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-339"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-340"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-341"></span><span>
</span><span id="line-342"></span><span class="hs-comment">{- Note [Which transformations are innocuous]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At one point (Jun 18) I wondered if some transformations (ticks)
might be  &quot;innocuous&quot;, in the sense that they do not unlock a later
transformation that does not occur in the same pass.  If so, we could
refrain from bumping the overall tick-count for such innocuous
transformations, and perhaps terminate the simplifier one pass
earlier.

But alas I found that virtually nothing was innocuous!  This Note
just records what I learned, in case anyone wants to try again.

These transformations are not innocuous:

*** NB: I think these ones could be made innocuous
          EtaExpansion
          LetFloatFromLet

LetFloatFromLet
    x = K (let z = e2 in Just z)
  prepareRhs transforms to
    x2 = let z=e2 in Just z
    x  = K xs
  And now more let-floating can happen in the
  next pass, on x2

PreInlineUnconditionally
  Example in spectral/cichelli/Auxil
     hinsert = ...let lo = e in
                  let j = ...lo... in
                  case x of
                    False -&gt; ()
                    True -&gt; case lo of I# lo' -&gt;
                              ...j...
  When we PreInlineUnconditionally j, lo's occ-info changes to once,
  so it can be PreInlineUnconditionally in the next pass, and a
  cascade of further things can happen.

PostInlineUnconditionally
  let x = e in
  let y = ...x.. in
  case .. of { A -&gt; ...x...y...
               B -&gt; ...x...y... }
  Current postinlineUnconditinaly will inline y, and then x; sigh.

  But PostInlineUnconditionally might also unlock subsequent
  transformations for the same reason as PreInlineUnconditionally,
  so it's probably not innocuous anyway.

KnownBranch, BetaReduction:
  May drop chunks of code, and thereby enable PreInlineUnconditionally
  for some let-binding which now occurs once

EtaExpansion:
  Example in imaginary/digits-of-e1
    fail = \void. e          where e :: IO ()
  --&gt; etaExpandRhs
    fail = \void. (\s. (e |&gt; g) s) |&gt; sym g      where g :: IO () ~ S -&gt; (S,())
  --&gt; Next iteration of simplify
    fail1 = \void. \s. (e |&gt; g) s
    fail = fail1 |&gt; Void# -&gt; sym g
  And now inline 'fail'

CaseMerge:
  case x of y {
    DEFAULT -&gt; case y of z { pi -&gt; ei }
    alts2 }
  ---&gt; CaseMerge
    case x of { pi -&gt; let z = y in ei
              ; alts2 }
  The &quot;let z=y&quot; case-binder-swap gets dealt with in the next pass
-}</span><span>
</span><span id="line-414"></span><span>
</span><span id="line-415"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCounts"><span class="hs-identifier hs-type">pprTickCounts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-416"></span><span id="pprTickCounts"><span class="annot"><span class="annottext">pprTickCounts :: TickCounts -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprTickCounts"><span class="hs-identifier hs-var hs-var">pprTickCounts</span></a></span></span><span> </span><span id="local-6989586621680926647"><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926647"><span class="hs-identifier hs-var">counts</span></a></span></span><span>
</span><span id="line-417"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([(Tick, Int)] -&gt; SDoc) -&gt; [[(Tick, Int)]] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">[(Tick, Int)] -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprTickGroup"><span class="hs-identifier hs-var">pprTickGroup</span></a></span><span> </span><span class="annot"><span class="annottext">[[(Tick, Int)]]
</span><a href="#local-6989586621680926645"><span class="hs-identifier hs-var">groups</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-418"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-419"></span><span>    </span><span class="annot"><a href="#local-6989586621680926645"><span class="hs-identifier hs-type">groups</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- Each group shares a common tag</span><span>
</span><span id="line-420"></span><span>                                </span><span class="hs-comment">-- toList returns common tags adjacent</span><span>
</span><span id="line-421"></span><span>    </span><span id="local-6989586621680926645"><span class="annot"><span class="annottext">groups :: [[(Tick, Int)]]
</span><a href="#local-6989586621680926645"><span class="hs-identifier hs-var hs-var">groups</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Tick, Int) -&gt; (Tick, Int) -&gt; Bool)
-&gt; [(Tick, Int)] -&gt; [[(Tick, Int)]]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="../../base/src/Data.OldList.html#groupBy"><span class="hs-identifier hs-var">groupBy</span></a></span><span> </span><span class="annot"><span class="annottext">(Tick, Int) -&gt; (Tick, Int) -&gt; Bool
forall {b} {b}. (Tick, b) -&gt; (Tick, b) -&gt; Bool
</span><a href="#local-6989586621680926644"><span class="hs-identifier hs-var">same_tag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TickCounts -&gt; [(Tick, Int)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">TickCounts
</span><a href="#local-6989586621680926647"><span class="hs-identifier hs-var">counts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-422"></span><span>    </span><span id="local-6989586621680926644"><span class="annot"><span class="annottext">same_tag :: (Tick, b) -&gt; (Tick, b) -&gt; Bool
</span><a href="#local-6989586621680926644"><span class="hs-identifier hs-var hs-var">same_tag</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680926641"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926641"><span class="hs-identifier hs-var">tick1</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680926640"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926640"><span class="hs-identifier hs-var">tick2</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">b
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Tick -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926641"><span class="hs-identifier hs-var">tick1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926640"><span class="hs-identifier hs-var">tick2</span></a></span><span>
</span><span id="line-423"></span><span>
</span><span id="line-424"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickGroup"><span class="hs-identifier hs-type">pprTickGroup</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-425"></span><span id="pprTickGroup"><span class="annot"><span class="annottext">pprTickGroup :: [(Tick, Int)] -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprTickGroup"><span class="hs-identifier hs-var hs-var">pprTickGroup</span></a></span></span><span> </span><span id="local-6989586621680926638"><span class="annot"><span class="annottext">group :: [(Tick, Int)]
</span><a href="#local-6989586621680926638"><span class="hs-identifier hs-var">group</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621680926637"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926637"><span class="hs-identifier hs-var">tick1</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[(Tick, Int)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-426"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Int
forall (t :: * -&gt; *) a. (Foldable t, Num a) =&gt; t a -&gt; a
</span><a href="../../base/src/Data.Foldable.html#sum"><span class="hs-identifier hs-var">sum</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926634"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tick
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621680926634"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926634"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Tick, Int)]
</span><a href="#local-6989586621680926638"><span class="hs-identifier hs-var">group</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tick -&gt; String
</span><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926637"><span class="hs-identifier hs-var">tick1</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>       </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926632"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926630"><span class="hs-identifier hs-var">tick</span></a></span><span>
</span><span id="line-428"></span><span>                                    </span><span class="hs-comment">-- flip as we want largest first</span><span>
</span><span id="line-429"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680926630"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926630"><span class="hs-identifier hs-var">tick</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680926632"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680926632"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">((Tick, Int) -&gt; (Tick, Int) -&gt; Ordering)
-&gt; [(Tick, Int)] -&gt; [(Tick, Int)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Tick, Int) -&gt; (Tick, Int) -&gt; Ordering)
-&gt; (Tick, Int) -&gt; (Tick, Int) -&gt; Ordering
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Tick, Int) -&gt; Int) -&gt; (Tick, Int) -&gt; (Tick, Int) -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">(Tick, Int) -&gt; Int
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Tick, Int)]
</span><a href="#local-6989586621680926638"><span class="hs-identifier hs-var">group</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-430"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickGroup"><span class="hs-identifier hs-var">pprTickGroup</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pprTickGroup&quot;</span></span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span class="hs-keyword">data</span><span> </span><span id="Tick"><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-var">Tick</span></a></span></span><span>  </span><span class="hs-comment">-- See Note [Which transformations are innocuous]</span><span>
</span><span id="line-433"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="PreInlineUnconditionally"><span class="annot"><a href="GHC.Core.Opt.Monad.html#PreInlineUnconditionally"><span class="hs-identifier hs-var">PreInlineUnconditionally</span></a></span></span><span>    </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-434"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="PostInlineUnconditionally"><span class="annot"><a href="GHC.Core.Opt.Monad.html#PostInlineUnconditionally"><span class="hs-identifier hs-var">PostInlineUnconditionally</span></a></span></span><span>   </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-435"></span><span>
</span><span id="line-436"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="UnfoldingDone"><span class="annot"><a href="GHC.Core.Opt.Monad.html#UnfoldingDone"><span class="hs-identifier hs-var">UnfoldingDone</span></a></span></span><span>               </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-437"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="RuleFired"><span class="annot"><a href="GHC.Core.Opt.Monad.html#RuleFired"><span class="hs-identifier hs-var">RuleFired</span></a></span></span><span>                   </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>      </span><span class="hs-comment">-- Rule name</span><span>
</span><span id="line-438"></span><span>
</span><span id="line-439"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LetFloatFromLet"><span class="annot"><a href="GHC.Core.Opt.Monad.html#LetFloatFromLet"><span class="hs-identifier hs-var">LetFloatFromLet</span></a></span></span><span>
</span><span id="line-440"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="EtaExpansion"><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaExpansion"><span class="hs-identifier hs-var">EtaExpansion</span></a></span></span><span>                </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- LHS binder</span><span>
</span><span id="line-441"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="EtaReduction"><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaReduction"><span class="hs-identifier hs-var">EtaReduction</span></a></span></span><span>                </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Binder on outer lambda</span><span>
</span><span id="line-442"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="BetaReduction"><span class="annot"><a href="GHC.Core.Opt.Monad.html#BetaReduction"><span class="hs-identifier hs-var">BetaReduction</span></a></span></span><span>               </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Lambda binder</span><span>
</span><span id="line-443"></span><span>
</span><span id="line-444"></span><span>
</span><span id="line-445"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CaseOfCase"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseOfCase"><span class="hs-identifier hs-var">CaseOfCase</span></a></span></span><span>                  </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Bndr on *inner* case</span><span>
</span><span id="line-446"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="KnownBranch"><span class="annot"><a href="GHC.Core.Opt.Monad.html#KnownBranch"><span class="hs-identifier hs-var">KnownBranch</span></a></span></span><span>                 </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Case binder</span><span>
</span><span id="line-447"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CaseMerge"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseMerge"><span class="hs-identifier hs-var">CaseMerge</span></a></span></span><span>                   </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Binder on outer case</span><span>
</span><span id="line-448"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="AltMerge"><span class="annot"><a href="GHC.Core.Opt.Monad.html#AltMerge"><span class="hs-identifier hs-var">AltMerge</span></a></span></span><span>                    </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Case binder</span><span>
</span><span id="line-449"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CaseElim"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseElim"><span class="hs-identifier hs-var">CaseElim</span></a></span></span><span>                    </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Case binder</span><span>
</span><span id="line-450"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CaseIdentity"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseIdentity"><span class="hs-identifier hs-var">CaseIdentity</span></a></span></span><span>                </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Case binder</span><span>
</span><span id="line-451"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="FillInCaseDefault"><span class="annot"><a href="GHC.Core.Opt.Monad.html#FillInCaseDefault"><span class="hs-identifier hs-var">FillInCaseDefault</span></a></span></span><span>           </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>      </span><span class="hs-comment">-- Case binder</span><span>
</span><span id="line-452"></span><span>
</span><span id="line-453"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SimplifierDone"><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplifierDone"><span class="hs-identifier hs-var">SimplifierDone</span></a></span></span><span>              </span><span class="hs-comment">-- Ticked at each iteration of the simplifier</span><span>
</span><span id="line-454"></span><span>
</span><span id="line-455"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926608"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-456"></span><span>  </span><span id="local-6989586621680926607"><span class="annot"><span class="annottext">ppr :: Tick -&gt; SDoc
</span><a href="#local-6989586621680926607"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680926606"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926606"><span class="hs-identifier hs-var">tick</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tick -&gt; String
</span><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926606"><span class="hs-identifier hs-var">tick</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926606"><span class="hs-identifier hs-var">tick</span></a></span><span>
</span><span id="line-457"></span><span>
</span><span id="line-458"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926603"><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-459"></span><span>  </span><span id="local-6989586621680926601"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926601"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680926600"><span class="annot"><span class="annottext">== :: Tick -&gt; Tick -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></span></span><span> </span><span id="local-6989586621680926599"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926599"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926601"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; Tick -&gt; Ordering
</span><a href="GHC.Core.Opt.Monad.html#cmpTick"><span class="hs-operator hs-var">`cmpTick`</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926599"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-460"></span><span>           </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-461"></span><span>           </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-462"></span><span>
</span><span id="line-463"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926583"><span id="local-6989586621680926585"><span id="local-6989586621680926587"><span id="local-6989586621680926589"><span id="local-6989586621680926591"><span id="local-6989586621680926593"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-464"></span><span>  </span><span id="local-6989586621680926581"><span class="annot"><span class="annottext">compare :: Tick -&gt; Tick -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Tick -&gt; Tick -&gt; Ordering
</span><a href="GHC.Core.Opt.Monad.html#cmpTick"><span class="hs-identifier hs-var">cmpTick</span></a></span><span>
</span><span id="line-465"></span><span>
</span><span id="line-466"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-type">tickToTag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-467"></span><span id="tickToTag"><span class="annot"><span class="annottext">tickToTag :: Tick -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var hs-var">tickToTag</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PreInlineUnconditionally"><span class="hs-identifier hs-type">PreInlineUnconditionally</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-468"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PostInlineUnconditionally"><span class="hs-identifier hs-type">PostInlineUnconditionally</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-469"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#UnfoldingDone"><span class="hs-identifier hs-type">UnfoldingDone</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-470"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#RuleFired"><span class="hs-identifier hs-type">RuleFired</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-471"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="GHC.Core.Opt.Monad.html#LetFloatFromLet"><span class="hs-identifier hs-var">LetFloatFromLet</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span>
</span><span id="line-472"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaExpansion"><span class="hs-identifier hs-type">EtaExpansion</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span>
</span><span id="line-473"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaReduction"><span class="hs-identifier hs-type">EtaReduction</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span>
</span><span id="line-474"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#BetaReduction"><span class="hs-identifier hs-type">BetaReduction</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span>
</span><span id="line-475"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseOfCase"><span class="hs-identifier hs-type">CaseOfCase</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span>
</span><span id="line-476"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#KnownBranch"><span class="hs-identifier hs-type">KnownBranch</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">9</span></span><span>
</span><span id="line-477"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseMerge"><span class="hs-identifier hs-type">CaseMerge</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-478"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseElim"><span class="hs-identifier hs-type">CaseElim</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">11</span></span><span>
</span><span id="line-479"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseIdentity"><span class="hs-identifier hs-type">CaseIdentity</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">12</span></span><span>
</span><span id="line-480"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FillInCaseDefault"><span class="hs-identifier hs-type">FillInCaseDefault</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">13</span></span><span>
</span><span id="line-481"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="GHC.Core.Opt.Monad.html#SimplifierDone"><span class="hs-identifier hs-var">SimplifierDone</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span>
</span><span id="line-482"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#AltMerge"><span class="hs-identifier hs-type">AltMerge</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">17</span></span><span>
</span><span id="line-483"></span><span>
</span><span id="line-484"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-type">tickString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-485"></span><span id="tickString"><span class="annot"><span class="annottext">tickString :: Tick -&gt; String
</span><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var hs-var">tickString</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PreInlineUnconditionally"><span class="hs-identifier hs-type">PreInlineUnconditionally</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PreInlineUnconditionally&quot;</span></span><span>
</span><span id="line-486"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PostInlineUnconditionally"><span class="hs-identifier hs-type">PostInlineUnconditionally</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PostInlineUnconditionally&quot;</span></span><span>
</span><span id="line-487"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#UnfoldingDone"><span class="hs-identifier hs-type">UnfoldingDone</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UnfoldingDone&quot;</span></span><span>
</span><span id="line-488"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#RuleFired"><span class="hs-identifier hs-type">RuleFired</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RuleFired&quot;</span></span><span>
</span><span id="line-489"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="GHC.Core.Opt.Monad.html#LetFloatFromLet"><span class="hs-identifier hs-var">LetFloatFromLet</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;LetFloatFromLet&quot;</span></span><span>
</span><span id="line-490"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaExpansion"><span class="hs-identifier hs-type">EtaExpansion</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;EtaExpansion&quot;</span></span><span>
</span><span id="line-491"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaReduction"><span class="hs-identifier hs-type">EtaReduction</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;EtaReduction&quot;</span></span><span>
</span><span id="line-492"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#BetaReduction"><span class="hs-identifier hs-type">BetaReduction</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;BetaReduction&quot;</span></span><span>
</span><span id="line-493"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseOfCase"><span class="hs-identifier hs-type">CaseOfCase</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CaseOfCase&quot;</span></span><span>
</span><span id="line-494"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#KnownBranch"><span class="hs-identifier hs-type">KnownBranch</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;KnownBranch&quot;</span></span><span>
</span><span id="line-495"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseMerge"><span class="hs-identifier hs-type">CaseMerge</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CaseMerge&quot;</span></span><span>
</span><span id="line-496"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#AltMerge"><span class="hs-identifier hs-type">AltMerge</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;AltMerge&quot;</span></span><span>
</span><span id="line-497"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseElim"><span class="hs-identifier hs-type">CaseElim</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CaseElim&quot;</span></span><span>
</span><span id="line-498"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseIdentity"><span class="hs-identifier hs-type">CaseIdentity</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CaseIdentity&quot;</span></span><span>
</span><span id="line-499"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FillInCaseDefault"><span class="hs-identifier hs-type">FillInCaseDefault</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;FillInCaseDefault&quot;</span></span><span>
</span><span id="line-500"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#tickString"><span class="hs-identifier hs-var">tickString</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="GHC.Core.Opt.Monad.html#SimplifierDone"><span class="hs-identifier hs-var">SimplifierDone</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SimplifierDone&quot;</span></span><span>
</span><span id="line-501"></span><span>
</span><span id="line-502"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-type">pprTickCts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-503"></span><span id="pprTickCts"><span class="annot"><span class="annottext">pprTickCts :: Tick -&gt; SDoc
</span><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var hs-var">pprTickCts</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PreInlineUnconditionally"><span class="hs-identifier hs-type">PreInlineUnconditionally</span></a></span><span> </span><span id="local-6989586621680926579"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926579"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926579"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-504"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PostInlineUnconditionally"><span class="hs-identifier hs-type">PostInlineUnconditionally</span></a></span><span> </span><span id="local-6989586621680926578"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926578"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926578"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-505"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#UnfoldingDone"><span class="hs-identifier hs-type">UnfoldingDone</span></a></span><span> </span><span id="local-6989586621680926577"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926577"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926577"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-506"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#RuleFired"><span class="hs-identifier hs-type">RuleFired</span></a></span><span> </span><span id="local-6989586621680926576"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680926576"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680926576"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-507"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="GHC.Core.Opt.Monad.html#LetFloatFromLet"><span class="hs-identifier hs-var">LetFloatFromLet</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-508"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaExpansion"><span class="hs-identifier hs-type">EtaExpansion</span></a></span><span> </span><span id="local-6989586621680926575"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926575"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926575"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-509"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaReduction"><span class="hs-identifier hs-type">EtaReduction</span></a></span><span> </span><span id="local-6989586621680926574"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926574"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926574"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-510"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#BetaReduction"><span class="hs-identifier hs-type">BetaReduction</span></a></span><span> </span><span id="local-6989586621680926573"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926573"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926573"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-511"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseOfCase"><span class="hs-identifier hs-type">CaseOfCase</span></a></span><span> </span><span id="local-6989586621680926572"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926572"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926572"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-512"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#KnownBranch"><span class="hs-identifier hs-type">KnownBranch</span></a></span><span> </span><span id="local-6989586621680926571"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926571"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926571"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-513"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseMerge"><span class="hs-identifier hs-type">CaseMerge</span></a></span><span> </span><span id="local-6989586621680926570"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926570"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926570"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-514"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#AltMerge"><span class="hs-identifier hs-type">AltMerge</span></a></span><span> </span><span id="local-6989586621680926569"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926569"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926569"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-515"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseElim"><span class="hs-identifier hs-type">CaseElim</span></a></span><span> </span><span id="local-6989586621680926568"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926568"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926568"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-516"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseIdentity"><span class="hs-identifier hs-type">CaseIdentity</span></a></span><span> </span><span id="local-6989586621680926567"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926567"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926567"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-517"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FillInCaseDefault"><span class="hs-identifier hs-type">FillInCaseDefault</span></a></span><span> </span><span id="local-6989586621680926566"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926566"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926566"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-518"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#pprTickCts"><span class="hs-identifier hs-var">pprTickCts</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><span class="hs-identifier">_</span></span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-519"></span><span>
</span><span id="line-520"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpTick"><span class="hs-identifier hs-type">cmpTick</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-521"></span><span id="cmpTick"><span class="annot"><span class="annottext">cmpTick :: Tick -&gt; Tick -&gt; Ordering
</span><a href="GHC.Core.Opt.Monad.html#cmpTick"><span class="hs-identifier hs-var hs-var">cmpTick</span></a></span></span><span> </span><span id="local-6989586621680926565"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926565"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680926564"><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926564"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tick -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926565"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Tick -&gt; Int
</span><a href="GHC.Core.Opt.Monad.html#tickToTag"><span class="hs-identifier hs-var">tickToTag</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926564"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-522"></span><span>                </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-523"></span><span>                </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Tick -&gt; Tick -&gt; Ordering
</span><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926565"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><a href="#local-6989586621680926564"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-524"></span><span>                </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-type">cmpEqTick</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#Tick"><span class="hs-identifier hs-type">Tick</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-527"></span><span id="cmpEqTick"><span class="annot"><span class="annottext">cmpEqTick :: Tick -&gt; Tick -&gt; Ordering
</span><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var hs-var">cmpEqTick</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PreInlineUnconditionally"><span class="hs-identifier hs-type">PreInlineUnconditionally</span></a></span><span> </span><span id="local-6989586621680926562"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926562"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PreInlineUnconditionally"><span class="hs-identifier hs-type">PreInlineUnconditionally</span></a></span><span> </span><span id="local-6989586621680926561"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926561"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926562"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926561"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-528"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PostInlineUnconditionally"><span class="hs-identifier hs-type">PostInlineUnconditionally</span></a></span><span> </span><span id="local-6989586621680926560"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926560"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#PostInlineUnconditionally"><span class="hs-identifier hs-type">PostInlineUnconditionally</span></a></span><span> </span><span id="local-6989586621680926559"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926559"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926560"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926559"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-529"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#UnfoldingDone"><span class="hs-identifier hs-type">UnfoldingDone</span></a></span><span> </span><span id="local-6989586621680926558"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926558"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#UnfoldingDone"><span class="hs-identifier hs-type">UnfoldingDone</span></a></span><span> </span><span id="local-6989586621680926557"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926557"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926558"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926557"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-530"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#RuleFired"><span class="hs-identifier hs-type">RuleFired</span></a></span><span> </span><span id="local-6989586621680926556"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680926556"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>                 </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#RuleFired"><span class="hs-identifier hs-type">RuleFired</span></a></span><span> </span><span id="local-6989586621680926555"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680926555"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680926556"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680926555"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-531"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaExpansion"><span class="hs-identifier hs-type">EtaExpansion</span></a></span><span> </span><span id="local-6989586621680926554"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926554"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaExpansion"><span class="hs-identifier hs-type">EtaExpansion</span></a></span><span> </span><span id="local-6989586621680926553"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926553"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926554"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926553"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-532"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaReduction"><span class="hs-identifier hs-type">EtaReduction</span></a></span><span> </span><span id="local-6989586621680926552"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926552"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#EtaReduction"><span class="hs-identifier hs-type">EtaReduction</span></a></span><span> </span><span id="local-6989586621680926551"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926551"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926552"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926551"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-533"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#BetaReduction"><span class="hs-identifier hs-type">BetaReduction</span></a></span><span> </span><span id="local-6989586621680926550"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926550"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#BetaReduction"><span class="hs-identifier hs-type">BetaReduction</span></a></span><span> </span><span id="local-6989586621680926549"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926549"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926550"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926549"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-534"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseOfCase"><span class="hs-identifier hs-type">CaseOfCase</span></a></span><span> </span><span id="local-6989586621680926548"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926548"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseOfCase"><span class="hs-identifier hs-type">CaseOfCase</span></a></span><span> </span><span id="local-6989586621680926547"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926547"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926548"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926547"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-535"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#KnownBranch"><span class="hs-identifier hs-type">KnownBranch</span></a></span><span> </span><span id="local-6989586621680926546"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926546"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>               </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#KnownBranch"><span class="hs-identifier hs-type">KnownBranch</span></a></span><span> </span><span id="local-6989586621680926545"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926545"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926546"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926545"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-536"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseMerge"><span class="hs-identifier hs-type">CaseMerge</span></a></span><span> </span><span id="local-6989586621680926544"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926544"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>                 </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseMerge"><span class="hs-identifier hs-type">CaseMerge</span></a></span><span> </span><span id="local-6989586621680926543"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926543"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926544"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926543"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-537"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#AltMerge"><span class="hs-identifier hs-type">AltMerge</span></a></span><span> </span><span id="local-6989586621680926542"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926542"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>                  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#AltMerge"><span class="hs-identifier hs-type">AltMerge</span></a></span><span> </span><span id="local-6989586621680926541"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926541"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926542"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926541"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-538"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseElim"><span class="hs-identifier hs-type">CaseElim</span></a></span><span> </span><span id="local-6989586621680926540"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926540"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>                  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseElim"><span class="hs-identifier hs-type">CaseElim</span></a></span><span> </span><span id="local-6989586621680926539"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926539"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926540"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926539"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-539"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseIdentity"><span class="hs-identifier hs-type">CaseIdentity</span></a></span><span> </span><span id="local-6989586621680926538"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926538"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CaseIdentity"><span class="hs-identifier hs-type">CaseIdentity</span></a></span><span> </span><span id="local-6989586621680926537"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926537"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926538"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926537"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-540"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FillInCaseDefault"><span class="hs-identifier hs-type">FillInCaseDefault</span></a></span><span> </span><span id="local-6989586621680926536"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926536"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#FillInCaseDefault"><span class="hs-identifier hs-type">FillInCaseDefault</span></a></span><span> </span><span id="local-6989586621680926535"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926535"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926536"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Id -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621680926535"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-541"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#cmpEqTick"><span class="hs-identifier hs-var">cmpEqTick</span></a></span><span> </span><span class="annot"><span class="annottext">Tick
</span><span class="hs-identifier">_</span></span><span>                             </span><span class="annot"><span class="annottext">Tick
</span><span class="hs-identifier">_</span></span><span>                               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span>
</span><span id="line-542"></span><span>
</span><span id="line-543"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
             Monad and carried data structure definitions
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-550"></span><span>
</span><span id="line-551"></span><span class="hs-keyword">data</span><span> </span><span id="CoreReader"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreReader"><span class="hs-identifier hs-var">CoreReader</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CoreReader"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreReader"><span class="hs-identifier hs-var">CoreReader</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-552"></span><span>        </span><span id="cr_hsc_env"><span class="annot"><span class="annottext">CoreReader -&gt; HscEnv
</span><a href="GHC.Core.Opt.Monad.html#cr_hsc_env"><span class="hs-identifier hs-var hs-var">cr_hsc_env</span></a></span></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-553"></span><span>        </span><span id="cr_rule_base"><span class="annot"><span class="annottext">CoreReader -&gt; RuleBase
</span><a href="GHC.Core.Opt.Monad.html#cr_rule_base"><span class="hs-identifier hs-var hs-var">cr_rule_base</span></a></span></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#RuleBase"><span class="hs-identifier hs-type">RuleBase</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-554"></span><span>        </span><span id="cr_module"><span class="annot"><span class="annottext">CoreReader -&gt; Module
</span><a href="GHC.Core.Opt.Monad.html#cr_module"><span class="hs-identifier hs-var hs-var">cr_module</span></a></span></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-555"></span><span>        </span><span id="cr_print_unqual"><span class="annot"><span class="annottext">CoreReader -&gt; PrintUnqualified
</span><a href="GHC.Core.Opt.Monad.html#cr_print_unqual"><span class="hs-identifier hs-var hs-var">cr_print_unqual</span></a></span></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#PrintUnqualified"><span class="hs-identifier hs-type">PrintUnqualified</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-556"></span><span>        </span><span id="cr_loc"><span class="annot"><span class="annottext">CoreReader -&gt; SrcSpan
</span><a href="GHC.Core.Opt.Monad.html#cr_loc"><span class="hs-identifier hs-var hs-var">cr_loc</span></a></span></span><span>                 </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- Use this for log/error messages so they</span><span>
</span><span id="line-557"></span><span>                                             </span><span class="hs-comment">-- are at least tagged with the right source file</span><span>
</span><span id="line-558"></span><span>        </span><span id="cr_visible_orphan_mods"><span class="annot"><span class="annottext">CoreReader -&gt; ModuleSet
</span><a href="GHC.Core.Opt.Monad.html#cr_visible_orphan_mods"><span class="hs-identifier hs-var hs-var">cr_visible_orphan_mods</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Unit.Module.Env.html#ModuleSet"><span class="hs-identifier hs-type">ModuleSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-559"></span><span>        </span><span id="cr_uniq_mask"><span class="annot"><span class="annottext">CoreReader -&gt; Char
</span><a href="GHC.Core.Opt.Monad.html#cr_uniq_mask"><span class="hs-identifier hs-var hs-var">cr_uniq_mask</span></a></span></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>      </span><span class="hs-comment">-- Mask for creating unique values</span><span>
</span><span id="line-560"></span><span class="hs-special">}</span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span class="hs-comment">-- Note: CoreWriter used to be defined with data, rather than newtype.  If it</span><span>
</span><span id="line-563"></span><span class="hs-comment">-- is defined that way again, the cw_simpl_count field, at least, must be</span><span>
</span><span id="line-564"></span><span class="hs-comment">-- strict to avoid a space leak (#7702).</span><span>
</span><span id="line-565"></span><span class="hs-keyword">newtype</span><span> </span><span id="CoreWriter"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-var">CoreWriter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CoreWriter"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-var">CoreWriter</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-566"></span><span>        </span><span id="cw_simpl_count"><span class="annot"><span class="annottext">CoreWriter -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#cw_simpl_count"><span class="hs-identifier hs-var hs-var">cw_simpl_count</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span>
</span><span id="line-567"></span><span class="hs-special">}</span><span>
</span><span id="line-568"></span><span>
</span><span id="line-569"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#emptyWriter"><span class="hs-identifier hs-type">emptyWriter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span>
</span><span id="line-570"></span><span id="emptyWriter"><span class="annot"><span class="annottext">emptyWriter :: DynFlags -&gt; CoreWriter
</span><a href="GHC.Core.Opt.Monad.html#emptyWriter"><span class="hs-identifier hs-var hs-var">emptyWriter</span></a></span></span><span> </span><span id="local-6989586621680926523"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926523"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreWriter :: SimplCount -&gt; CoreWriter
</span><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-571"></span><span>        </span><span class="annot"><span class="annottext">cw_simpl_count :: SimplCount
</span><a href="GHC.Core.Opt.Monad.html#cw_simpl_count"><span class="hs-identifier hs-var">cw_simpl_count</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#zeroSimplCount"><span class="hs-identifier hs-var">zeroSimplCount</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926523"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-572"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-573"></span><span>
</span><span id="line-574"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#plusWriter"><span class="hs-identifier hs-type">plusWriter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span>
</span><span id="line-575"></span><span id="plusWriter"><span class="annot"><span class="annottext">plusWriter :: CoreWriter -&gt; CoreWriter -&gt; CoreWriter
</span><a href="GHC.Core.Opt.Monad.html#plusWriter"><span class="hs-identifier hs-var hs-var">plusWriter</span></a></span></span><span> </span><span id="local-6989586621680926521"><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926521"><span class="hs-identifier hs-var">w1</span></a></span></span><span> </span><span id="local-6989586621680926520"><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926520"><span class="hs-identifier hs-var">w2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreWriter :: SimplCount -&gt; CoreWriter
</span><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-576"></span><span>        </span><span class="annot"><span class="annottext">cw_simpl_count :: SimplCount
</span><a href="GHC.Core.Opt.Monad.html#cw_simpl_count"><span class="hs-identifier hs-var">cw_simpl_count</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreWriter -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#cw_simpl_count"><span class="hs-identifier hs-var hs-var">cw_simpl_count</span></a></span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926521"><span class="hs-identifier hs-var">w1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; SimplCount -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#plusSimplCount"><span class="hs-operator hs-var">`plusSimplCount`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreWriter -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#cw_simpl_count"><span class="hs-identifier hs-var hs-var">cw_simpl_count</span></a></span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926520"><span class="hs-identifier hs-var">w2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-577"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span class="hs-keyword">type</span><span> </span><span id="CoreIOEnv"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreIOEnv"><span class="hs-identifier hs-var">CoreIOEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Data.IOEnv.html#IOEnv"><span class="hs-identifier hs-type">IOEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreReader"><span class="hs-identifier hs-type">CoreReader</span></a></span><span>
</span><span id="line-580"></span><span>
</span><span id="line-581"></span><span class="hs-comment">-- | The monad used by Core-to-Core passes to register simplification statistics.</span><span>
</span><span id="line-582"></span><span class="hs-comment">--  Also used to have common state (in the form of UniqueSupply) for generating Uniques.</span><span>
</span><span id="line-583"></span><span class="hs-keyword">newtype</span><span> </span><span id="CoreM"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span></span><span> </span><span id="local-6989586621680927083"><span class="annot"><a href="#local-6989586621680927083"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CoreM"><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unCoreM"><span class="annot"><span class="annottext">forall a. CoreM a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#unCoreM"><span class="hs-identifier hs-var hs-var">unCoreM</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreIOEnv"><span class="hs-identifier hs-type">CoreIOEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680927083"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-584"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680926512"><span id="local-6989586621680926516"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; CoreM a -&gt; CoreM b)
-&gt; (forall a b. a -&gt; CoreM b -&gt; CoreM a) -&gt; Functor CoreM
forall a b. a -&gt; CoreM b -&gt; CoreM a
forall a b. (a -&gt; b) -&gt; CoreM a -&gt; CoreM b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; CoreM b -&gt; CoreM a
$c&lt;$ :: forall a b. a -&gt; CoreM b -&gt; CoreM a
fmap :: forall a b. (a -&gt; b) -&gt; CoreM a -&gt; CoreM b
$cfmap :: forall a b. (a -&gt; b) -&gt; CoreM a -&gt; CoreM b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-585"></span><span>
</span><span id="line-586"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926502"><span id="local-6989586621680926504"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-587"></span><span>    </span><span id="local-6989586621680926497"><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926497"><span class="hs-identifier hs-var">mx</span></a></span></span><span> </span><span id="local-6989586621680926496"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. CoreM a -&gt; (a -&gt; CoreM b) -&gt; CoreM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621680926495"><span class="annot"><span class="annottext">a -&gt; CoreM b
</span><a href="#local-6989586621680926495"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (b, CoreWriter) -&gt; CoreM b
forall a. CoreIOEnv (a, CoreWriter) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreIOEnv (b, CoreWriter) -&gt; CoreM b)
-&gt; CoreIOEnv (b, CoreWriter) -&gt; CoreM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-588"></span><span>            </span><span class="hs-special">(</span><span id="local-6989586621680926494"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926494"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680926493"><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926493"><span class="hs-identifier hs-var">w1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM a -&gt; CoreIOEnv (a, CoreWriter)
forall a. CoreM a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#unCoreM"><span class="hs-identifier hs-var hs-var">unCoreM</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926497"><span class="hs-identifier hs-var">mx</span></a></span><span>
</span><span id="line-589"></span><span>            </span><span class="hs-special">(</span><span id="local-6989586621680926492"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680926492"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680926491"><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926491"><span class="hs-identifier hs-var">w2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM b -&gt; CoreIOEnv (b, CoreWriter)
forall a. CoreM a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#unCoreM"><span class="hs-identifier hs-var hs-var">unCoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; CoreM b
</span><a href="#local-6989586621680926495"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926494"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-590"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680926490"><span class="annot"><span class="annottext">w :: CoreWriter
</span><a href="#local-6989586621680926490"><span class="hs-identifier hs-var hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926493"><span class="hs-identifier hs-var">w1</span></a></span><span> </span><span class="annot"><span class="annottext">CoreWriter -&gt; CoreWriter -&gt; CoreWriter
</span><a href="GHC.Core.Opt.Monad.html#plusWriter"><span class="hs-operator hs-var">`plusWriter`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926491"><span class="hs-identifier hs-var">w2</span></a></span><span>
</span><span id="line-591"></span><span>            </span><span class="annot"><span class="annottext">(b, CoreWriter) -&gt; CoreIOEnv (b, CoreWriter)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">((b, CoreWriter) -&gt; CoreIOEnv (b, CoreWriter))
-&gt; (b, CoreWriter) -&gt; CoreIOEnv (b, CoreWriter)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreWriter -&gt; (b, CoreWriter) -&gt; (b, CoreWriter)
</span><span class="hs-identifier hs-var">seq</span></span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926490"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680926492"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926490"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-592"></span><span>            </span><span class="hs-comment">-- forcing w before building the tuple avoids a space leak</span><span>
</span><span id="line-593"></span><span>            </span><span class="hs-comment">-- (#7702)</span><span>
</span><span id="line-594"></span><span>
</span><span id="line-595"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926481"><span id="local-6989586621680926484"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-596"></span><span>    </span><span id="local-6989586621680926479"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; CoreM a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621680926478"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926478"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (a, CoreWriter) -&gt; CoreM a
forall a. CoreIOEnv (a, CoreWriter) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreIOEnv (a, CoreWriter) -&gt; CoreM a)
-&gt; CoreIOEnv (a, CoreWriter) -&gt; CoreM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CoreIOEnv (a, CoreWriter)
forall a. a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#nop"><span class="hs-identifier hs-var">nop</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926478"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-597"></span><span>    </span><span id="local-6989586621680926475"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. CoreM (a -&gt; b) -&gt; CoreM a -&gt; CoreM b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreM (a -&gt; b) -&gt; CoreM a -&gt; CoreM b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span><span>
</span><span id="line-598"></span><span>    </span><span id="local-6989586621680926472"><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926472"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680926471"><span class="annot"><span class="annottext">*&gt; :: forall a b. CoreM a -&gt; CoreM b -&gt; CoreM b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">*&gt;</span></a></span></span><span> </span><span id="local-6989586621680926470"><span class="annot"><span class="annottext">CoreM b
</span><a href="#local-6989586621680926470"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926472"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM a -&gt; (a -&gt; CoreM b) -&gt; CoreM b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CoreM b
</span><a href="#local-6989586621680926470"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-599"></span><span>
</span><span id="line-600"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926462"><span id="local-6989586621680926464"><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-601"></span><span>    </span><span id="local-6989586621680926458"><span class="annot"><span class="annottext">empty :: forall a. CoreM a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (a, CoreWriter) -&gt; CoreM a
forall a. CoreIOEnv (a, CoreWriter) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (a, CoreWriter)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var">Control.Applicative.empty</span></a></span><span>
</span><span id="line-602"></span><span>    </span><span id="local-6989586621680926455"><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926455"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680926454"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. CoreM a -&gt; CoreM a -&gt; CoreM a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span id="local-6989586621680926452"><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926452"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (a, CoreWriter) -&gt; CoreM a
forall a. CoreIOEnv (a, CoreWriter) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreM a -&gt; CoreIOEnv (a, CoreWriter)
forall a. CoreM a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#unCoreM"><span class="hs-identifier hs-var hs-var">unCoreM</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926455"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (a, CoreWriter)
-&gt; CoreIOEnv (a, CoreWriter) -&gt; CoreIOEnv (a, CoreWriter)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM a -&gt; CoreIOEnv (a, CoreWriter)
forall a. CoreM a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#unCoreM"><span class="hs-identifier hs-var hs-var">unCoreM</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926452"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-603"></span><span>
</span><span id="line-604"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926444"><span id="local-6989586621680926446"><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span></span></span><span>
</span><span id="line-605"></span><span>
</span><span id="line-606"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680926437"><span class="annot"><a href="GHC.Types.Unique.Supply.html#MonadUnique"><span class="hs-identifier hs-type">MonadUnique</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-607"></span><span>    </span><span id="local-6989586621680926433"><span class="annot"><span class="annottext">getUniqueSupplyM :: CoreM UniqSupply
</span><a href="GHC.Types.Unique.Supply.html#getUniqueSupplyM"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUniqueSupplyM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-608"></span><span>        </span><span id="local-6989586621680926431"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680926431"><span class="hs-identifier hs-var">mask</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; Char) -&gt; CoreM Char
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; Char
</span><a href="GHC.Core.Opt.Monad.html#cr_uniq_mask"><span class="hs-identifier hs-var hs-var">cr_uniq_mask</span></a></span><span>
</span><span id="line-609"></span><span>        </span><span class="annot"><span class="annottext">IO UniqSupply -&gt; CoreM UniqSupply
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO UniqSupply -&gt; CoreM UniqSupply)
-&gt; IO UniqSupply -&gt; CoreM UniqSupply
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; IO UniqSupply
</span><a href="GHC.Types.Unique.Supply.html#mkSplitUniqSupply"><span class="hs-identifier hs-var">mkSplitUniqSupply</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680926431"><span class="hs-identifier hs-var">mask</span></a></span><span>
</span><span id="line-610"></span><span>
</span><span id="line-611"></span><span>    </span><span id="local-6989586621680926425"><span class="annot"><span class="annottext">getUniqueM :: CoreM Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUniqueM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-612"></span><span>        </span><span id="local-6989586621680926423"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680926423"><span class="hs-identifier hs-var">mask</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; Char) -&gt; CoreM Char
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; Char
</span><a href="GHC.Core.Opt.Monad.html#cr_uniq_mask"><span class="hs-identifier hs-var hs-var">cr_uniq_mask</span></a></span><span>
</span><span id="line-613"></span><span>        </span><span class="annot"><span class="annottext">IO Unique -&gt; CoreM Unique
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO Unique -&gt; CoreM Unique) -&gt; IO Unique -&gt; CoreM Unique
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; IO Unique
</span><a href="GHC.Types.Unique.Supply.html#uniqFromMask"><span class="hs-identifier hs-var">uniqFromMask</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680926423"><span class="hs-identifier hs-var">mask</span></a></span><span>
</span><span id="line-614"></span><span>
</span><span id="line-615"></span><span id="local-6989586621680927030"><span class="annot"><a href="GHC.Core.Opt.Monad.html#runCoreM"><span class="hs-identifier hs-type">runCoreM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-616"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#RuleBase"><span class="hs-identifier hs-type">RuleBase</span></a></span><span>
</span><span id="line-617"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-comment">-- ^ Mask</span><span>
</span><span id="line-618"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-619"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Env.html#ModuleSet"><span class="hs-identifier hs-type">ModuleSet</span></a></span><span>
</span><span id="line-620"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#PrintUnqualified"><span class="hs-identifier hs-type">PrintUnqualified</span></a></span><span>
</span><span id="line-621"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span>
</span><span id="line-622"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927030"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-623"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680927030"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-624"></span><span id="runCoreM"><span class="annot"><span class="annottext">runCoreM :: forall a.
HscEnv
-&gt; RuleBase
-&gt; Char
-&gt; Module
-&gt; ModuleSet
-&gt; PrintUnqualified
-&gt; SrcSpan
-&gt; CoreM a
-&gt; IO (a, SimplCount)
</span><a href="GHC.Core.Opt.Monad.html#runCoreM"><span class="hs-identifier hs-var hs-var">runCoreM</span></a></span></span><span> </span><span id="local-6989586621680926419"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621680926419"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621680926418"><span class="annot"><span class="annottext">RuleBase
</span><a href="#local-6989586621680926418"><span class="hs-identifier hs-var">rule_base</span></a></span></span><span> </span><span id="local-6989586621680926417"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680926417"><span class="hs-identifier hs-var">mask</span></a></span></span><span> </span><span id="local-6989586621680926416"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680926416"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680926415"><span class="annot"><span class="annottext">ModuleSet
</span><a href="#local-6989586621680926415"><span class="hs-identifier hs-var">orph_imps</span></a></span></span><span> </span><span id="local-6989586621680926414"><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926414"><span class="hs-identifier hs-var">print_unqual</span></a></span></span><span> </span><span id="local-6989586621680926413"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680926413"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621680926412"><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926412"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-625"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((a, CoreWriter) -&gt; (a, SimplCount))
-&gt; IO (a, CoreWriter) -&gt; IO (a, SimplCount)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">(a, CoreWriter) -&gt; (a, SimplCount)
forall a. (a, CoreWriter) -&gt; (a, SimplCount)
</span><a href="#local-6989586621680926410"><span class="hs-identifier hs-var">extract</span></a></span><span> </span><span class="annot"><span class="annottext">(IO (a, CoreWriter) -&gt; IO (a, SimplCount))
-&gt; IO (a, CoreWriter) -&gt; IO (a, SimplCount)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader
-&gt; IOEnv CoreReader (a, CoreWriter) -&gt; IO (a, CoreWriter)
forall env a. env -&gt; IOEnv env a -&gt; IO a
</span><a href="GHC.Data.IOEnv.html#runIOEnv"><span class="hs-identifier hs-var">runIOEnv</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader
</span><a href="#local-6989586621680926408"><span class="hs-identifier hs-var">reader</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv CoreReader (a, CoreWriter) -&gt; IO (a, CoreWriter))
-&gt; IOEnv CoreReader (a, CoreWriter) -&gt; IO (a, CoreWriter)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM a -&gt; IOEnv CoreReader (a, CoreWriter)
forall a. CoreM a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#unCoreM"><span class="hs-identifier hs-var hs-var">unCoreM</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM a
</span><a href="#local-6989586621680926412"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-626"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-627"></span><span>    </span><span id="local-6989586621680926408"><span class="annot"><span class="annottext">reader :: CoreReader
</span><a href="#local-6989586621680926408"><span class="hs-identifier hs-var hs-var">reader</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreReader :: HscEnv
-&gt; RuleBase
-&gt; Module
-&gt; PrintUnqualified
-&gt; SrcSpan
-&gt; ModuleSet
-&gt; Char
-&gt; CoreReader
</span><a href="GHC.Core.Opt.Monad.html#CoreReader"><span class="hs-identifier hs-type">CoreReader</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-628"></span><span>            </span><span class="annot"><span class="annottext">cr_hsc_env :: HscEnv
</span><a href="GHC.Core.Opt.Monad.html#cr_hsc_env"><span class="hs-identifier hs-var">cr_hsc_env</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621680926419"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-629"></span><span>            </span><span class="annot"><span class="annottext">cr_rule_base :: RuleBase
</span><a href="GHC.Core.Opt.Monad.html#cr_rule_base"><span class="hs-identifier hs-var">cr_rule_base</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleBase
</span><a href="#local-6989586621680926418"><span class="hs-identifier hs-var">rule_base</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-630"></span><span>            </span><span class="annot"><span class="annottext">cr_module :: Module
</span><a href="GHC.Core.Opt.Monad.html#cr_module"><span class="hs-identifier hs-var">cr_module</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680926416"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-631"></span><span>            </span><span class="annot"><span class="annottext">cr_visible_orphan_mods :: ModuleSet
</span><a href="GHC.Core.Opt.Monad.html#cr_visible_orphan_mods"><span class="hs-identifier hs-var">cr_visible_orphan_mods</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleSet
</span><a href="#local-6989586621680926415"><span class="hs-identifier hs-var">orph_imps</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-632"></span><span>            </span><span class="annot"><span class="annottext">cr_print_unqual :: PrintUnqualified
</span><a href="GHC.Core.Opt.Monad.html#cr_print_unqual"><span class="hs-identifier hs-var">cr_print_unqual</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926414"><span class="hs-identifier hs-var">print_unqual</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-633"></span><span>            </span><span class="annot"><span class="annottext">cr_loc :: SrcSpan
</span><a href="GHC.Core.Opt.Monad.html#cr_loc"><span class="hs-identifier hs-var">cr_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680926413"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-634"></span><span>            </span><span class="annot"><span class="annottext">cr_uniq_mask :: Char
</span><a href="GHC.Core.Opt.Monad.html#cr_uniq_mask"><span class="hs-identifier hs-var">cr_uniq_mask</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680926417"><span class="hs-identifier hs-var">mask</span></a></span><span>
</span><span id="line-635"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-636"></span><span>
</span><span id="line-637"></span><span>    </span><span id="local-6989586621680927025"><span class="annot"><a href="#local-6989586621680926410"><span class="hs-identifier hs-type">extract</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680927025"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680927025"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-638"></span><span>    </span><span id="local-6989586621680926410"><span class="annot"><span class="annottext">extract :: forall a. (a, CoreWriter) -&gt; (a, SimplCount)
</span><a href="#local-6989586621680926410"><span class="hs-identifier hs-var hs-var">extract</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680926407"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926407"><span class="hs-identifier hs-var">value</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680926406"><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926406"><span class="hs-identifier hs-var">writer</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926407"><span class="hs-identifier hs-var">value</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreWriter -&gt; SimplCount
</span><a href="GHC.Core.Opt.Monad.html#cw_simpl_count"><span class="hs-identifier hs-var hs-var">cw_simpl_count</span></a></span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926406"><span class="hs-identifier hs-var">writer</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-639"></span><span>
</span><span id="line-640"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
             Core combinators, not exported
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-647"></span><span>
</span><span id="line-648"></span><span id="local-6989586621680927054"><span class="annot"><a href="GHC.Core.Opt.Monad.html#nop"><span class="hs-identifier hs-type">nop</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680927054"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreIOEnv"><span class="hs-identifier hs-type">CoreIOEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621680927054"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-649"></span><span id="nop"><span class="annot"><span class="annottext">nop :: forall a. a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#nop"><span class="hs-identifier hs-var hs-var">nop</span></a></span></span><span> </span><span id="local-6989586621680926403"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926403"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-650"></span><span>    </span><span id="local-6989586621680926402"><span class="annot"><span class="annottext">CoreReader
</span><a href="#local-6989586621680926402"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv CoreReader CoreReader
forall env. IOEnv env env
</span><a href="GHC.Data.IOEnv.html#getEnv"><span class="hs-identifier hs-var">getEnv</span></a></span><span>
</span><span id="line-651"></span><span>    </span><span class="annot"><span class="annottext">(a, CoreWriter) -&gt; CoreIOEnv (a, CoreWriter)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926403"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; CoreWriter
</span><a href="GHC.Core.Opt.Monad.html#emptyWriter"><span class="hs-identifier hs-var">emptyWriter</span></a></span><span> </span><span class="annot"><span class="annottext">(DynFlags -&gt; CoreWriter) -&gt; DynFlags -&gt; CoreWriter
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">(HscEnv -&gt; DynFlags)
-&gt; (CoreReader -&gt; HscEnv) -&gt; CoreReader -&gt; DynFlags
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; HscEnv
</span><a href="GHC.Core.Opt.Monad.html#cr_hsc_env"><span class="hs-identifier hs-var hs-var">cr_hsc_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreReader
</span><a href="#local-6989586621680926402"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-652"></span><span>
</span><span id="line-653"></span><span id="local-6989586621680927033"><span class="annot"><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-type">read</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreReader"><span class="hs-identifier hs-type">CoreReader</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680927033"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927033"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-654"></span><span id="read"><span class="annot"><span class="annottext">read :: forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var hs-var">read</span></a></span></span><span> </span><span id="local-6989586621680926398"><span class="annot"><span class="annottext">CoreReader -&gt; a
</span><a href="#local-6989586621680926398"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (a, CoreWriter) -&gt; CoreM a
forall a. CoreIOEnv (a, CoreWriter) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreIOEnv (a, CoreWriter) -&gt; CoreM a)
-&gt; CoreIOEnv (a, CoreWriter) -&gt; CoreM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IOEnv CoreReader CoreReader
forall env. IOEnv env env
</span><a href="GHC.Data.IOEnv.html#getEnv"><span class="hs-identifier hs-var">getEnv</span></a></span><span> </span><span class="annot"><span class="annottext">IOEnv CoreReader CoreReader
-&gt; (CoreReader -&gt; CoreIOEnv (a, CoreWriter))
-&gt; CoreIOEnv (a, CoreWriter)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680926397"><span class="annot"><span class="annottext">CoreReader
</span><a href="#local-6989586621680926397"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; CoreIOEnv (a, CoreWriter)
forall a. a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#nop"><span class="hs-identifier hs-var">nop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreReader -&gt; a
</span><a href="#local-6989586621680926398"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader
</span><a href="#local-6989586621680926397"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-655"></span><span>
</span><span id="line-656"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#write"><span class="hs-identifier hs-type">write</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-657"></span><span id="write"><span class="annot"><span class="annottext">write :: CoreWriter -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#write"><span class="hs-identifier hs-var hs-var">write</span></a></span></span><span> </span><span id="local-6989586621680926395"><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926395"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv ((), CoreWriter) -&gt; CoreM ()
forall a. CoreIOEnv (a, CoreWriter) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreIOEnv ((), CoreWriter) -&gt; CoreM ())
-&gt; CoreIOEnv ((), CoreWriter) -&gt; CoreM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((), CoreWriter) -&gt; CoreIOEnv ((), CoreWriter)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreWriter
</span><a href="#local-6989586621680926395"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-658"></span><span>
</span><span id="line-659"></span><span class="hs-comment">-- \subsection{Lifting IO into the monad}</span><span>
</span><span id="line-660"></span><span>
</span><span id="line-661"></span><span class="hs-comment">-- | Lift an 'IOEnv' operation into 'CoreM'</span><span>
</span><span id="line-662"></span><span id="local-6989586621680927018"><span class="annot"><a href="GHC.Core.Opt.Monad.html#liftIOEnv"><span class="hs-identifier hs-type">liftIOEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreIOEnv"><span class="hs-identifier hs-type">CoreIOEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927018"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927018"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-663"></span><span id="liftIOEnv"><span class="annot"><span class="annottext">liftIOEnv :: forall a. CoreIOEnv a -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#liftIOEnv"><span class="hs-identifier hs-var hs-var">liftIOEnv</span></a></span></span><span> </span><span id="local-6989586621680926392"><span class="annot"><span class="annottext">CoreIOEnv a
</span><a href="#local-6989586621680926392"><span class="hs-identifier hs-var">mx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv (a, CoreWriter) -&gt; CoreM a
forall a. CoreIOEnv (a, CoreWriter) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-var">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreIOEnv a
</span><a href="#local-6989586621680926392"><span class="hs-identifier hs-var">mx</span></a></span><span> </span><span class="annot"><span class="annottext">CoreIOEnv a
-&gt; (a -&gt; CoreIOEnv (a, CoreWriter)) -&gt; CoreIOEnv (a, CoreWriter)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680926391"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926391"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; CoreIOEnv (a, CoreWriter)
forall a. a -&gt; CoreIOEnv (a, CoreWriter)
</span><a href="GHC.Core.Opt.Monad.html#nop"><span class="hs-identifier hs-var">nop</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926391"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-664"></span><span>
</span><span id="line-665"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-666"></span><span>    </span><span id="local-6989586621680926384"><span class="annot"><span class="annottext">liftIO :: forall a. IO a -&gt; CoreM a
</span><a href="#local-6989586621680926384"><span class="hs-identifier hs-var hs-var hs-var hs-var">liftIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreIOEnv a -&gt; CoreM a
forall a. CoreIOEnv a -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#liftIOEnv"><span class="hs-identifier hs-var">liftIOEnv</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreIOEnv a -&gt; CoreM a)
-&gt; (IO a -&gt; CoreIOEnv a) -&gt; IO a -&gt; CoreM a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IO a -&gt; CoreIOEnv a
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">IOEnv.liftIO</span></a></span><span>
</span><span id="line-667"></span><span>
</span><span id="line-668"></span><span class="hs-comment">-- | Lift an 'IO' operation into 'CoreM' while consuming its 'SimplCount'</span><span>
</span><span id="line-669"></span><span id="local-6989586621680927015"><span class="annot"><a href="GHC.Core.Opt.Monad.html#liftIOWithCount"><span class="hs-identifier hs-type">liftIOWithCount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680927015"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927015"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-670"></span><span id="liftIOWithCount"><span class="annot"><span class="annottext">liftIOWithCount :: forall a. IO (SimplCount, a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#liftIOWithCount"><span class="hs-identifier hs-var hs-var">liftIOWithCount</span></a></span></span><span> </span><span id="local-6989586621680926379"><span class="annot"><span class="annottext">IO (SimplCount, a)
</span><a href="#local-6989586621680926379"><span class="hs-identifier hs-var">what</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO (SimplCount, a) -&gt; CoreM (SimplCount, a)
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">IO (SimplCount, a)
</span><a href="#local-6989586621680926379"><span class="hs-identifier hs-var">what</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM (SimplCount, a) -&gt; ((SimplCount, a) -&gt; CoreM a) -&gt; CoreM a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621680926378"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926378"><span class="hs-identifier hs-var">count</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680926377"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926377"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SimplCount -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#addSimplCount"><span class="hs-identifier hs-var">addSimplCount</span></a></span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926378"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM () -&gt; CoreM a -&gt; CoreM a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; CoreM a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680926377"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-671"></span><span>
</span><span id="line-672"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
             Reader, writer and state accessors
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-679"></span><span>
</span><span id="line-680"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getHscEnv"><span class="hs-identifier hs-type">getHscEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-681"></span><span id="getHscEnv"><span class="annot"><span class="annottext">getHscEnv :: CoreM HscEnv
</span><a href="GHC.Core.Opt.Monad.html#getHscEnv"><span class="hs-identifier hs-var hs-var">getHscEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; HscEnv) -&gt; CoreM HscEnv
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; HscEnv
</span><a href="GHC.Core.Opt.Monad.html#cr_hsc_env"><span class="hs-identifier hs-var hs-var">cr_hsc_env</span></a></span><span>
</span><span id="line-682"></span><span>
</span><span id="line-683"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getRuleBase"><span class="hs-identifier hs-type">getRuleBase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#RuleBase"><span class="hs-identifier hs-type">RuleBase</span></a></span><span>
</span><span id="line-684"></span><span id="getRuleBase"><span class="annot"><span class="annottext">getRuleBase :: CoreM RuleBase
</span><a href="GHC.Core.Opt.Monad.html#getRuleBase"><span class="hs-identifier hs-var hs-var">getRuleBase</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; RuleBase) -&gt; CoreM RuleBase
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; RuleBase
</span><a href="GHC.Core.Opt.Monad.html#cr_rule_base"><span class="hs-identifier hs-var hs-var">cr_rule_base</span></a></span><span>
</span><span id="line-685"></span><span>
</span><span id="line-686"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getVisibleOrphanMods"><span class="hs-identifier hs-type">getVisibleOrphanMods</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Env.html#ModuleSet"><span class="hs-identifier hs-type">ModuleSet</span></a></span><span>
</span><span id="line-687"></span><span id="getVisibleOrphanMods"><span class="annot"><span class="annottext">getVisibleOrphanMods :: CoreM ModuleSet
</span><a href="GHC.Core.Opt.Monad.html#getVisibleOrphanMods"><span class="hs-identifier hs-var hs-var">getVisibleOrphanMods</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; ModuleSet) -&gt; CoreM ModuleSet
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; ModuleSet
</span><a href="GHC.Core.Opt.Monad.html#cr_visible_orphan_mods"><span class="hs-identifier hs-var hs-var">cr_visible_orphan_mods</span></a></span><span>
</span><span id="line-688"></span><span>
</span><span id="line-689"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getPrintUnqualified"><span class="hs-identifier hs-type">getPrintUnqualified</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#PrintUnqualified"><span class="hs-identifier hs-type">PrintUnqualified</span></a></span><span>
</span><span id="line-690"></span><span id="getPrintUnqualified"><span class="annot"><span class="annottext">getPrintUnqualified :: CoreM PrintUnqualified
</span><a href="GHC.Core.Opt.Monad.html#getPrintUnqualified"><span class="hs-identifier hs-var hs-var">getPrintUnqualified</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; PrintUnqualified) -&gt; CoreM PrintUnqualified
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; PrintUnqualified
</span><a href="GHC.Core.Opt.Monad.html#cr_print_unqual"><span class="hs-identifier hs-var hs-var">cr_print_unqual</span></a></span><span>
</span><span id="line-691"></span><span>
</span><span id="line-692"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getSrcSpanM"><span class="hs-identifier hs-type">getSrcSpanM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span>
</span><span id="line-693"></span><span id="getSrcSpanM"><span class="annot"><span class="annottext">getSrcSpanM :: CoreM SrcSpan
</span><a href="GHC.Core.Opt.Monad.html#getSrcSpanM"><span class="hs-identifier hs-var hs-var">getSrcSpanM</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; SrcSpan) -&gt; CoreM SrcSpan
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; SrcSpan
</span><a href="GHC.Core.Opt.Monad.html#cr_loc"><span class="hs-identifier hs-var hs-var">cr_loc</span></a></span><span>
</span><span id="line-694"></span><span>
</span><span id="line-695"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#addSimplCount"><span class="hs-identifier hs-type">addSimplCount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#SimplCount"><span class="hs-identifier hs-type">SimplCount</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-696"></span><span id="addSimplCount"><span class="annot"><span class="annottext">addSimplCount :: SimplCount -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#addSimplCount"><span class="hs-identifier hs-var hs-var">addSimplCount</span></a></span></span><span> </span><span id="local-6989586621680926376"><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926376"><span class="hs-identifier hs-var">count</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreWriter -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#write"><span class="hs-identifier hs-var">write</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreWriter :: SimplCount -&gt; CoreWriter
</span><a href="GHC.Core.Opt.Monad.html#CoreWriter"><span class="hs-identifier hs-type">CoreWriter</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cw_simpl_count :: SimplCount
</span><a href="GHC.Core.Opt.Monad.html#cw_simpl_count"><span class="hs-identifier hs-var">cw_simpl_count</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SimplCount
</span><a href="#local-6989586621680926376"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-697"></span><span>
</span><span id="line-698"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getUniqMask"><span class="hs-identifier hs-type">getUniqMask</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>
</span><span id="line-699"></span><span id="getUniqMask"><span class="annot"><span class="annottext">getUniqMask :: CoreM Char
</span><a href="GHC.Core.Opt.Monad.html#getUniqMask"><span class="hs-identifier hs-var hs-var">getUniqMask</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; Char) -&gt; CoreM Char
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; Char
</span><a href="GHC.Core.Opt.Monad.html#cr_uniq_mask"><span class="hs-identifier hs-var hs-var">cr_uniq_mask</span></a></span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span class="hs-comment">-- Convenience accessors for useful fields of HscEnv</span><span>
</span><span id="line-702"></span><span>
</span><span id="line-703"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#HasDynFlags"><span class="hs-identifier hs-type">HasDynFlags</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-704"></span><span>    </span><span id="local-6989586621680926372"><span class="annot"><span class="annottext">getDynFlags :: CoreM DynFlags
</span><a href="#local-6989586621680926372"><span class="hs-identifier hs-var hs-var hs-var hs-var">getDynFlags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HscEnv -&gt; DynFlags) -&gt; CoreM HscEnv -&gt; CoreM DynFlags
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">CoreM HscEnv
</span><a href="GHC.Core.Opt.Monad.html#getHscEnv"><span class="hs-identifier hs-var">getHscEnv</span></a></span><span>
</span><span id="line-705"></span><span>
</span><span id="line-706"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html#HasModule"><span class="hs-identifier hs-type">HasModule</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-707"></span><span>    </span><span id="local-6989586621680926368"><span class="annot"><span class="annottext">getModule :: CoreM Module
</span><a href="#local-6989586621680926368"><span class="hs-identifier hs-var hs-var hs-var hs-var">getModule</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreReader -&gt; Module) -&gt; CoreM Module
forall a. (CoreReader -&gt; a) -&gt; CoreM a
</span><a href="GHC.Core.Opt.Monad.html#read"><span class="hs-identifier hs-var">read</span></a></span><span> </span><span class="annot"><span class="annottext">CoreReader -&gt; Module
</span><a href="GHC.Core.Opt.Monad.html#cr_module"><span class="hs-identifier hs-var hs-var">cr_module</span></a></span><span>
</span><span id="line-708"></span><span>
</span><span id="line-709"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#getPackageFamInstEnv"><span class="hs-identifier hs-type">getPackageFamInstEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#PackageFamInstEnv"><span class="hs-identifier hs-type">PackageFamInstEnv</span></a></span><span>
</span><span id="line-710"></span><span id="getPackageFamInstEnv"><span class="annot"><span class="annottext">getPackageFamInstEnv :: CoreM PackageFamInstEnv
</span><a href="GHC.Core.Opt.Monad.html#getPackageFamInstEnv"><span class="hs-identifier hs-var hs-var">getPackageFamInstEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-711"></span><span>    </span><span id="local-6989586621680926367"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621680926367"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM HscEnv
</span><a href="GHC.Core.Opt.Monad.html#getHscEnv"><span class="hs-identifier hs-var">getHscEnv</span></a></span><span>
</span><span id="line-712"></span><span>    </span><span id="local-6989586621680926366"><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621680926366"><span class="hs-identifier hs-var">eps</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO ExternalPackageState -&gt; CoreM ExternalPackageState
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO ExternalPackageState -&gt; CoreM ExternalPackageState)
-&gt; IO ExternalPackageState -&gt; CoreM ExternalPackageState
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; IO ExternalPackageState
</span><a href="GHC.Driver.Types.html#hscEPS"><span class="hs-identifier hs-var">hscEPS</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621680926367"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-713"></span><span>    </span><span class="annot"><span class="annottext">PackageFamInstEnv -&gt; CoreM PackageFamInstEnv
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(PackageFamInstEnv -&gt; CoreM PackageFamInstEnv)
-&gt; PackageFamInstEnv -&gt; CoreM PackageFamInstEnv
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState -&gt; PackageFamInstEnv
</span><a href="GHC.Driver.Types.html#eps_fam_inst_env"><span class="hs-identifier hs-var hs-var">eps_fam_inst_env</span></a></span><span> </span><span class="annot"><span class="annottext">ExternalPackageState
</span><a href="#local-6989586621680926366"><span class="hs-identifier hs-var">eps</span></a></span><span>
</span><span id="line-714"></span><span>
</span><span id="line-715"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
             Dealing with annotations
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-722"></span><span>
</span><span id="line-723"></span><span class="hs-comment">-- | Get all annotations of a given type. This happens lazily, that is</span><span>
</span><span id="line-724"></span><span class="hs-comment">-- no deserialization will take place until the [a] is actually demanded and</span><span>
</span><span id="line-725"></span><span class="hs-comment">-- the [a] can also be empty (the UniqFM is not filtered).</span><span>
</span><span id="line-726"></span><span class="hs-comment">--</span><span>
</span><span id="line-727"></span><span class="hs-comment">-- This should be done once at the start of a Core-to-Core pass that uses</span><span>
</span><span id="line-728"></span><span class="hs-comment">-- annotations.</span><span>
</span><span id="line-729"></span><span class="hs-comment">--</span><span>
</span><span id="line-730"></span><span class="hs-comment">-- See Note [Annotations]</span><span>
</span><span id="line-731"></span><span id="local-6989586621680927008"><span class="annot"><a href="GHC.Core.Opt.Monad.html#getAnnotations"><span class="hs-identifier hs-type">getAnnotations</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927008"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680927008"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Module.Env.html#ModuleEnv"><span class="hs-identifier hs-type">ModuleEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680927008"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html#NameEnv"><span class="hs-identifier hs-type">NameEnv</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680927008"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-732"></span><span id="getAnnotations"><span class="annot"><span class="annottext">getAnnotations :: forall a.
Typeable a =&gt;
([Word8] -&gt; a) -&gt; ModGuts -&gt; CoreM (ModuleEnv [a], NameEnv [a])
</span><a href="GHC.Core.Opt.Monad.html#getAnnotations"><span class="hs-identifier hs-var hs-var">getAnnotations</span></a></span></span><span> </span><span id="local-6989586621680926357"><span class="annot"><span class="annottext">[Word8] -&gt; a
</span><a href="#local-6989586621680926357"><span class="hs-identifier hs-var">deserialize</span></a></span></span><span> </span><span id="local-6989586621680926356"><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680926356"><span class="hs-identifier hs-var">guts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-733"></span><span>     </span><span id="local-6989586621680926355"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621680926355"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM HscEnv
</span><a href="GHC.Core.Opt.Monad.html#getHscEnv"><span class="hs-identifier hs-var">getHscEnv</span></a></span><span>
</span><span id="line-734"></span><span>     </span><span id="local-6989586621680926354"><span class="annot"><span class="annottext">AnnEnv
</span><a href="#local-6989586621680926354"><span class="hs-identifier hs-var">ann_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO AnnEnv -&gt; CoreM AnnEnv
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO AnnEnv -&gt; CoreM AnnEnv) -&gt; IO AnnEnv -&gt; CoreM AnnEnv
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; Maybe ModGuts -&gt; IO AnnEnv
</span><a href="GHC.Driver.Types.html#prepareAnnotations"><span class="hs-identifier hs-var">prepareAnnotations</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621680926355"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModGuts -&gt; Maybe ModGuts
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680926356"><span class="hs-identifier hs-var">guts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-735"></span><span>     </span><span class="annot"><span class="annottext">(ModuleEnv [a], NameEnv [a]) -&gt; CoreM (ModuleEnv [a], NameEnv [a])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([Word8] -&gt; a) -&gt; AnnEnv -&gt; (ModuleEnv [a], NameEnv [a])
forall a.
Typeable a =&gt;
([Word8] -&gt; a) -&gt; AnnEnv -&gt; (ModuleEnv [a], NameEnv [a])
</span><a href="GHC.Types.Annotations.html#deserializeAnns"><span class="hs-identifier hs-var">deserializeAnns</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; a
</span><a href="#local-6989586621680926357"><span class="hs-identifier hs-var">deserialize</span></a></span><span> </span><span class="annot"><span class="annottext">AnnEnv
</span><a href="#local-6989586621680926354"><span class="hs-identifier hs-var">ann_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-736"></span><span>
</span><span id="line-737"></span><span class="hs-comment">-- | Get at most one annotation of a given type per annotatable item.</span><span>
</span><span id="line-738"></span><span id="local-6989586621680927002"><span class="annot"><a href="GHC.Core.Opt.Monad.html#getFirstAnnotations"><span class="hs-identifier hs-type">getFirstAnnotations</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927002"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680927002"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Module.Env.html#ModuleEnv"><span class="hs-identifier hs-type">ModuleEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927002"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html#NameEnv"><span class="hs-identifier hs-type">NameEnv</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680927002"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-739"></span><span id="getFirstAnnotations"><span class="annot"><span class="annottext">getFirstAnnotations :: forall a.
Typeable a =&gt;
([Word8] -&gt; a) -&gt; ModGuts -&gt; CoreM (ModuleEnv a, NameEnv a)
</span><a href="GHC.Core.Opt.Monad.html#getFirstAnnotations"><span class="hs-identifier hs-var hs-var">getFirstAnnotations</span></a></span></span><span> </span><span id="local-6989586621680926346"><span class="annot"><span class="annottext">[Word8] -&gt; a
</span><a href="#local-6989586621680926346"><span class="hs-identifier hs-var">deserialize</span></a></span></span><span> </span><span id="local-6989586621680926345"><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680926345"><span class="hs-identifier hs-var">guts</span></a></span></span><span>
</span><span id="line-740"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ModuleEnv [a] -&gt; ModuleEnv a)
-&gt; (NameEnv [a] -&gt; NameEnv a)
-&gt; (ModuleEnv [a], NameEnv [a])
-&gt; (ModuleEnv a, NameEnv a)
forall (p :: * -&gt; * -&gt; *) a b c d.
Bifunctor p =&gt;
(a -&gt; b) -&gt; (c -&gt; d) -&gt; p a c -&gt; p b d
</span><a href="../../base/src/Data.Bifunctor.html#bimap"><span class="hs-identifier hs-var">bimap</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleEnv [a] -&gt; ModuleEnv a
forall {b}. ModuleEnv [b] -&gt; ModuleEnv b
</span><a href="#local-6989586621680926344"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">NameEnv [a] -&gt; NameEnv a
forall {elt2}. NameEnv [elt2] -&gt; NameEnv elt2
</span><a href="#local-6989586621680926343"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">((ModuleEnv [a], NameEnv [a]) -&gt; (ModuleEnv a, NameEnv a))
-&gt; CoreM (ModuleEnv [a], NameEnv [a])
-&gt; CoreM (ModuleEnv a, NameEnv a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">([Word8] -&gt; a) -&gt; ModGuts -&gt; CoreM (ModuleEnv [a], NameEnv [a])
forall a.
Typeable a =&gt;
([Word8] -&gt; a) -&gt; ModGuts -&gt; CoreM (ModuleEnv [a], NameEnv [a])
</span><a href="GHC.Core.Opt.Monad.html#getAnnotations"><span class="hs-identifier hs-var">getAnnotations</span></a></span><span> </span><span class="annot"><span class="annottext">[Word8] -&gt; a
</span><a href="#local-6989586621680926346"><span class="hs-identifier hs-var">deserialize</span></a></span><span> </span><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680926345"><span class="hs-identifier hs-var">guts</span></a></span><span>
</span><span id="line-741"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-742"></span><span>    </span><span id="local-6989586621680926344"><span class="annot"><span class="annottext">mod :: ModuleEnv [b] -&gt; ModuleEnv b
</span><a href="#local-6989586621680926344"><span class="hs-identifier hs-var hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([b] -&gt; b) -&gt; ModuleEnv [b] -&gt; ModuleEnv b
forall a b. (a -&gt; b) -&gt; ModuleEnv a -&gt; ModuleEnv b
</span><a href="GHC.Unit.Module.Env.html#mapModuleEnv"><span class="hs-identifier hs-var">mapModuleEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; b
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleEnv [b] -&gt; ModuleEnv b)
-&gt; (ModuleEnv [b] -&gt; ModuleEnv [b]) -&gt; ModuleEnv [b] -&gt; ModuleEnv b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Module -&gt; [b] -&gt; Bool) -&gt; ModuleEnv [b] -&gt; ModuleEnv [b]
forall a. (Module -&gt; a -&gt; Bool) -&gt; ModuleEnv a -&gt; ModuleEnv a
</span><a href="GHC.Unit.Module.Env.html#filterModuleEnv"><span class="hs-identifier hs-var">filterModuleEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([b] -&gt; Bool) -&gt; Module -&gt; [b] -&gt; Bool
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">(([b] -&gt; Bool) -&gt; Module -&gt; [b] -&gt; Bool)
-&gt; ([b] -&gt; Bool) -&gt; Module -&gt; [b] -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; ([b] -&gt; Bool) -&gt; [b] -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-743"></span><span>    </span><span id="local-6989586621680926343"><span class="annot"><span class="annottext">name :: NameEnv [elt2] -&gt; NameEnv elt2
</span><a href="#local-6989586621680926343"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([elt2] -&gt; elt2) -&gt; NameEnv [elt2] -&gt; NameEnv elt2
forall elt1 elt2. (elt1 -&gt; elt2) -&gt; NameEnv elt1 -&gt; NameEnv elt2
</span><a href="GHC.Types.Name.Env.html#mapNameEnv"><span class="hs-identifier hs-var">mapNameEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[elt2] -&gt; elt2
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">(NameEnv [elt2] -&gt; NameEnv elt2)
-&gt; (NameEnv [elt2] -&gt; NameEnv [elt2])
-&gt; NameEnv [elt2]
-&gt; NameEnv elt2
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">([elt2] -&gt; Bool) -&gt; NameEnv [elt2] -&gt; NameEnv [elt2]
forall elt. (elt -&gt; Bool) -&gt; NameEnv elt -&gt; NameEnv elt
</span><a href="GHC.Types.Name.Env.html#filterNameEnv"><span class="hs-identifier hs-var">filterNameEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; ([elt2] -&gt; Bool) -&gt; [elt2] -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[elt2] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-744"></span><span>
</span><span id="line-745"></span><span class="hs-comment">{-
Note [Annotations]
~~~~~~~~~~~~~~~~~~
A Core-to-Core pass that wants to make use of annotations calls
getAnnotations or getFirstAnnotations at the beginning to obtain a UniqFM with
annotations of a specific type. This produces all annotations from interface
files read so far. However, annotations from interface files read during the
pass will not be visible until getAnnotations is called again. This is similar
to how rules work and probably isn't too bad.

The current implementation could be optimised a bit: when looking up
annotations for a thing from the HomePackageTable, we could search directly in
the module where the thing is defined rather than building one UniqFM which
contains all annotations we know of. This would work because annotations can
only be given to things defined in the same module. However, since we would
only want to deserialise every annotation once, we would have to build a cache
for every module in the HTP. In the end, it's probably not worth it as long as
we aren't using annotations heavily.

************************************************************************
*                                                                      *
                Direct screen output
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-770"></span><span>
</span><span id="line-771"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#msg"><span class="hs-identifier hs-type">msg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#Severity"><span class="hs-identifier hs-type">Severity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Flags.html#WarnReason"><span class="hs-identifier hs-type">WarnReason</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-772"></span><span id="msg"><span class="annot"><span class="annottext">msg :: Severity -&gt; WarnReason -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#msg"><span class="hs-identifier hs-var hs-var">msg</span></a></span></span><span> </span><span id="local-6989586621680926331"><span class="annot"><span class="annottext">Severity
</span><a href="#local-6989586621680926331"><span class="hs-identifier hs-var">sev</span></a></span></span><span> </span><span id="local-6989586621680926330"><span class="annot"><span class="annottext">WarnReason
</span><a href="#local-6989586621680926330"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621680926329"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680926329"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-773"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680926328"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926328"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-774"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621680926327"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680926327"><span class="hs-identifier hs-var">loc</span></a></span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM SrcSpan
</span><a href="GHC.Core.Opt.Monad.html#getSrcSpanM"><span class="hs-identifier hs-var">getSrcSpanM</span></a></span><span>
</span><span id="line-775"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621680926326"><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926326"><span class="hs-identifier hs-var">unqual</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM PrintUnqualified
</span><a href="GHC.Core.Opt.Monad.html#getPrintUnqualified"><span class="hs-identifier hs-var">getPrintUnqualified</span></a></span><span>
</span><span id="line-776"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680926325"><span class="annot"><span class="annottext">sty :: PprStyle
</span><a href="#local-6989586621680926325"><span class="hs-identifier hs-var hs-var">sty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="#local-6989586621680926331"><span class="hs-identifier hs-var">sev</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-777"></span><span>                     </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevError"><span class="hs-identifier hs-var">SevError</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680926323"><span class="hs-identifier hs-var">err_sty</span></a></span><span>
</span><span id="line-778"></span><span>                     </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevWarning"><span class="hs-identifier hs-var">SevWarning</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680926323"><span class="hs-identifier hs-var">err_sty</span></a></span><span>
</span><span id="line-779"></span><span>                     </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevDump"><span class="hs-identifier hs-var">SevDump</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680926320"><span class="hs-identifier hs-var">dump_sty</span></a></span><span>
</span><span id="line-780"></span><span>                     </span><span class="annot"><span class="annottext">Severity
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680926319"><span class="hs-identifier hs-var">user_sty</span></a></span><span>
</span><span id="line-781"></span><span>             </span><span id="local-6989586621680926323"><span class="annot"><span class="annottext">err_sty :: PprStyle
</span><a href="#local-6989586621680926323"><span class="hs-identifier hs-var hs-var">err_sty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PrintUnqualified -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkErrStyle"><span class="hs-identifier hs-var">mkErrStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926326"><span class="hs-identifier hs-var">unqual</span></a></span><span>
</span><span id="line-782"></span><span>             </span><span id="local-6989586621680926319"><span class="annot"><span class="annottext">user_sty :: PprStyle
</span><a href="#local-6989586621680926319"><span class="hs-identifier hs-var hs-var">user_sty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PrintUnqualified -&gt; Depth -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkUserStyle"><span class="hs-identifier hs-var">mkUserStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926326"><span class="hs-identifier hs-var">unqual</span></a></span><span> </span><span class="annot"><span class="annottext">Depth
</span><a href="GHC.Utils.Outputable.html#AllTheWay"><span class="hs-identifier hs-var">AllTheWay</span></a></span><span>
</span><span id="line-783"></span><span>             </span><span id="local-6989586621680926320"><span class="annot"><span class="annottext">dump_sty :: PprStyle
</span><a href="#local-6989586621680926320"><span class="hs-identifier hs-var hs-var">dump_sty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PrintUnqualified -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkDumpStyle"><span class="hs-identifier hs-var">mkDumpStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926326"><span class="hs-identifier hs-var">unqual</span></a></span><span>
</span><span id="line-784"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; CoreM ()
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; CoreM ()) -&gt; IO () -&gt; CoreM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; WarnReason -&gt; Severity -&gt; SrcSpan -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Driver.Session.html#putLogMsg"><span class="hs-identifier hs-var">putLogMsg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926328"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="#local-6989586621680926330"><span class="hs-identifier hs-var">reason</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="#local-6989586621680926331"><span class="hs-identifier hs-var">sev</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680926327"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PprStyle -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#withPprStyle"><span class="hs-identifier hs-var">withPprStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680926325"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680926329"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-785"></span><span>
</span><span id="line-786"></span><span class="hs-comment">-- | Output a String message to the screen</span><span>
</span><span id="line-787"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#putMsgS"><span class="hs-identifier hs-type">putMsgS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-788"></span><span id="putMsgS"><span class="annot"><span class="annottext">putMsgS :: String -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#putMsgS"><span class="hs-identifier hs-var hs-var">putMsgS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#putMsg"><span class="hs-identifier hs-var">putMsg</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; CoreM ()) -&gt; (String -&gt; SDoc) -&gt; String -&gt; CoreM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span>
</span><span id="line-789"></span><span>
</span><span id="line-790"></span><span class="hs-comment">-- | Output a message to the screen</span><span>
</span><span id="line-791"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#putMsg"><span class="hs-identifier hs-type">putMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-792"></span><span id="putMsg"><span class="annot"><span class="annottext">putMsg :: SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#putMsg"><span class="hs-identifier hs-var hs-var">putMsg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Severity -&gt; WarnReason -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#msg"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevInfo"><span class="hs-identifier hs-var">SevInfo</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.Flags.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span>
</span><span id="line-793"></span><span>
</span><span id="line-794"></span><span class="hs-comment">-- | Output an error to the screen. Does not cause the compiler to die.</span><span>
</span><span id="line-795"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#errorMsgS"><span class="hs-identifier hs-type">errorMsgS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-796"></span><span id="errorMsgS"><span class="annot"><span class="annottext">errorMsgS :: String -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#errorMsgS"><span class="hs-identifier hs-var hs-var">errorMsgS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#errorMsg"><span class="hs-identifier hs-var">errorMsg</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; CoreM ()) -&gt; (String -&gt; SDoc) -&gt; String -&gt; CoreM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span>
</span><span id="line-797"></span><span>
</span><span id="line-798"></span><span class="hs-comment">-- | Output an error to the screen. Does not cause the compiler to die.</span><span>
</span><span id="line-799"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#errorMsg"><span class="hs-identifier hs-type">errorMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span id="errorMsg"><span class="annot"><span class="annottext">errorMsg :: SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#errorMsg"><span class="hs-identifier hs-var hs-var">errorMsg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Severity -&gt; WarnReason -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#msg"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevError"><span class="hs-identifier hs-var">SevError</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.Flags.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span>
</span><span id="line-801"></span><span>
</span><span id="line-802"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#warnMsg"><span class="hs-identifier hs-type">warnMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Flags.html#WarnReason"><span class="hs-identifier hs-type">WarnReason</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-803"></span><span id="warnMsg"><span class="annot"><span class="annottext">warnMsg :: WarnReason -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#warnMsg"><span class="hs-identifier hs-var hs-var">warnMsg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Severity -&gt; WarnReason -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#msg"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevWarning"><span class="hs-identifier hs-var">SevWarning</span></a></span><span>
</span><span id="line-804"></span><span>
</span><span id="line-805"></span><span class="hs-comment">-- | Output a fatal error to the screen. Does not cause the compiler to die.</span><span>
</span><span id="line-806"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#fatalErrorMsgS"><span class="hs-identifier hs-type">fatalErrorMsgS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-807"></span><span id="fatalErrorMsgS"><span class="annot"><span class="annottext">fatalErrorMsgS :: String -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#fatalErrorMsgS"><span class="hs-identifier hs-var hs-var">fatalErrorMsgS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#fatalErrorMsg"><span class="hs-identifier hs-var">fatalErrorMsg</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; CoreM ()) -&gt; (String -&gt; SDoc) -&gt; String -&gt; CoreM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span>
</span><span id="line-808"></span><span>
</span><span id="line-809"></span><span class="hs-comment">-- | Output a fatal error to the screen. Does not cause the compiler to die.</span><span>
</span><span id="line-810"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#fatalErrorMsg"><span class="hs-identifier hs-type">fatalErrorMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-811"></span><span id="fatalErrorMsg"><span class="annot"><span class="annottext">fatalErrorMsg :: SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#fatalErrorMsg"><span class="hs-identifier hs-var hs-var">fatalErrorMsg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Severity -&gt; WarnReason -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#msg"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevFatal"><span class="hs-identifier hs-var">SevFatal</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.Flags.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span>
</span><span id="line-812"></span><span>
</span><span id="line-813"></span><span class="hs-comment">-- | Output a string debugging message at verbosity level of @-v@ or higher</span><span>
</span><span id="line-814"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#debugTraceMsgS"><span class="hs-identifier hs-type">debugTraceMsgS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-815"></span><span id="debugTraceMsgS"><span class="annot"><span class="annottext">debugTraceMsgS :: String -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#debugTraceMsgS"><span class="hs-identifier hs-var hs-var">debugTraceMsgS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#debugTraceMsg"><span class="hs-identifier hs-var">debugTraceMsg</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; CoreM ()) -&gt; (String -&gt; SDoc) -&gt; String -&gt; CoreM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span>
</span><span id="line-816"></span><span>
</span><span id="line-817"></span><span class="hs-comment">-- | Outputs a debugging message at verbosity level of @-v@ or higher</span><span>
</span><span id="line-818"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#debugTraceMsg"><span class="hs-identifier hs-type">debugTraceMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-819"></span><span id="debugTraceMsg"><span class="annot"><span class="annottext">debugTraceMsg :: SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#debugTraceMsg"><span class="hs-identifier hs-var hs-var">debugTraceMsg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Severity -&gt; WarnReason -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#msg"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">Severity
</span><a href="GHC.Utils.Error.html#SevDump"><span class="hs-identifier hs-var">SevDump</span></a></span><span> </span><span class="annot"><span class="annottext">WarnReason
</span><a href="GHC.Driver.Flags.html#NoReason"><span class="hs-identifier hs-var">NoReason</span></a></span><span>
</span><span id="line-820"></span><span>
</span><span id="line-821"></span><span class="hs-comment">-- | Show some labelled 'SDoc' if a particular flag is set or at a verbosity level of @-v -ddump-most@ or higher</span><span>
</span><span id="line-822"></span><span class="annot"><a href="GHC.Core.Opt.Monad.html#dumpIfSet_dyn"><span class="hs-identifier hs-type">dumpIfSet_dyn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Flags.html#DumpFlag"><span class="hs-identifier hs-type">DumpFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html#DumpFormat"><span class="hs-identifier hs-type">DumpFormat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-823"></span><span id="dumpIfSet_dyn"><span class="annot"><span class="annottext">dumpIfSet_dyn :: DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; CoreM ()
</span><a href="GHC.Core.Opt.Monad.html#dumpIfSet_dyn"><span class="hs-identifier hs-var hs-var">dumpIfSet_dyn</span></a></span></span><span> </span><span id="local-6989586621680926309"><span class="annot"><span class="annottext">DumpFlag
</span><a href="#local-6989586621680926309"><span class="hs-identifier hs-var">flag</span></a></span></span><span> </span><span id="local-6989586621680926308"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680926308"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span id="local-6989586621680926307"><span class="annot"><span class="annottext">DumpFormat
</span><a href="#local-6989586621680926307"><span class="hs-identifier hs-var">fmt</span></a></span></span><span> </span><span id="local-6989586621680926306"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680926306"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-824"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680926305"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926305"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-825"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621680926304"><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926304"><span class="hs-identifier hs-var">unqual</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM PrintUnqualified
</span><a href="GHC.Core.Opt.Monad.html#getPrintUnqualified"><span class="hs-identifier hs-var">getPrintUnqualified</span></a></span><span>
</span><span id="line-826"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; CoreM () -&gt; CoreM ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DumpFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#dopt"><span class="hs-identifier hs-var">dopt</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="#local-6989586621680926309"><span class="hs-identifier hs-var">flag</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926305"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CoreM () -&gt; CoreM ()) -&gt; CoreM () -&gt; CoreM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; CoreM ()
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; CoreM ()) -&gt; IO () -&gt; CoreM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-827"></span><span>         </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680926302"><span class="annot"><span class="annottext">sty :: PprStyle
</span><a href="#local-6989586621680926302"><span class="hs-identifier hs-var hs-var">sty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PrintUnqualified -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkDumpStyle"><span class="hs-identifier hs-var">mkDumpStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="#local-6989586621680926304"><span class="hs-identifier hs-var">unqual</span></a></span><span>
</span><span id="line-828"></span><span>         </span><span class="annot"><span class="annottext">DumpAction
</span><a href="GHC.Utils.Error.html#dumpAction"><span class="hs-identifier hs-var">dumpAction</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680926305"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680926302"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DumpFlag -&gt; DumpOptions
</span><a href="GHC.Utils.Error.html#dumpOptionsFromFlag"><span class="hs-identifier hs-var">dumpOptionsFromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="#local-6989586621680926309"><span class="hs-identifier hs-var">flag</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680926308"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="#local-6989586621680926307"><span class="hs-identifier hs-var">fmt</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680926306"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-829"></span></pre></body></html>